Initiate an Integration with OAuth 2.0

GET https://api.appypie.com/oauth/authorize

Method Details

HTTP Methods:

POST

Content Type:

application/x-www-form-urlencoded

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Use the code you get after a user authorizes your app to get an access token and refresh token.  The access token will be used to authenticate requests that your app makes.  Access tokens expire after 6 hours, so you can use the refresh token to get a new access token when the first access token expires.
Note: HubSpot access tokens will fluctuate in size as we change the information that is encoded the tokens. We recommend allowing for tokens to be up to 300 characters to account for any changes we may make.
Required Parameters How to use Description
Grant Type  grant_type=authorization_code
Used in the request body
The grant type of the request, must be authorization_code for the initial request to get the access and refresh tokens.
Client Id client_id=x The Client ID of your app.
Client Secret client_secret=x
Used in the request body
The Client Secret of your app.
Redirect URI  redirect_uri=x
Used in the request body
The redirect URI that was used when the user authorized your app. This must exactly match the redirect_uri used when intiating the OAuth 2.0 connection.
Code code=x
Used in the request body
The code parameter returned to your redirect URI when the user authorized your app.

Optional ParametersHow to useDescription
None None No optional parameters for this method.

JSON

Example Authorization URL:
Sending a user to this URL will ask the user to approve access to contacts and workflows:
https://api.appypie.com/oauth/authorize?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&redirect_uri=https://www.example.com/

If they grant access, the user would be redirected to this URL:
https://www.example.com/?code=xxxx

If there are any problems with the authorization, you'll get the error parameters instead of the code:
https://www.example.com/?error=error_code&error_description=Human%20readable%20description%20of%20the%20error