Feb 6, 202010:03 AM - edited Feb 6, 202010:05 AM
Contributor
Setting Up OAuth using PHP
SOLVE
I'm following with the HubSpot Academy course: Introduction to the HubSpot APIs. Im on to the Using OAuth with HubSpot part.
I'm working my way through the OAuth flow, but having difficulty as the course is written using NodeJs and im a little bit confused when trying to work with PHP.
I have succesfully managed to send the user to the authentication page (part 1/4).
Unfortunately I would not be the best resource when it comes to navigating this via PHP but the step you're referring to is in relation to the code which is passed as a URL parameter after the user has authenticated the integration.
When the OAuth URL is accessed, this will prompt the integration user to login to their portal and confirm the scope access, once this is done, the redirect will occur to the redirct_uri which will have the code appended to it. This will then need to be captured and used as part of the data in the request for the access and refresh tokens.
This could be captured by using something along the lines of:
Unfortunately I would not be the best resource when it comes to navigating this via PHP but the step you're referring to is in relation to the code which is passed as a URL parameter after the user has authenticated the integration.
When the OAuth URL is accessed, this will prompt the integration user to login to their portal and confirm the scope access, once this is done, the redirect will occur to the redirct_uri which will have the code appended to it. This will then need to be captured and used as part of the data in the request for the access and refresh tokens.
This could be captured by using something along the lines of: