Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to verify resthooks? #252

Open
xemacscode opened this issue Apr 16, 2020 · 1 comment
Open

how to verify resthooks? #252

xemacscode opened this issue Apr 16, 2020 · 1 comment

Comments

@xemacscode
Copy link

I followed the sample of resthooks subscription but it won't get verified.

$infusionsoft = new \Infusionsoft\Infusionsoft(array(
	'clientId'     => 'xp853bycywyd5qybp8wnxq6r',
	'clientSecret' => 'YMNedmx368',
	'redirectUri'  => 'http://staging.easyshoppingads.com/dash/isauth.php',
));

$header = $infusionsoft->resthooks()->autoverify();

I'm getting this when trying to list the subscription:

 {
    "key": "key",
    "eventKey": "eventkey",
    "hookUrl": "url I used",
    "status": "Unverified"
  }

Any thoughts?

@ajohnson6494
Copy link
Contributor

@xemacscode On your rest hook when you are returning a 200 response to Infusionsoft are you also including the header?

Using Laravel, I have to do the following:

response(200)->header('X-Hook-Secret', $request->header('X-Hook-Secret'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants