La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
I am trying to get notified when a deal is deleted so have set up an app and installed it at last. I have slowly got to the stage where I need to access and refresh tokens to get my new app to appear in Hubspot (and then hopefully my webhook will work). But it looks like I need to run this code:
POST URL:
https://api.hubapi.com/oauth/v1/token
Headers:
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Data:
grant_type=authorization_code&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&client_secret=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy&redirect_uri=https://www.example.com/&code=zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz
Does anyone know how / what tool to run this code in? Is it Node.Js as I don't know that.
It sounds like you might be up to "Step 4: Exchange authorization code for tokens" with your app, but I'd recommend going through the entire guide from start to finish, to make sure you understand the ins and outs of OAuth for HubSpot.
Addressing your question directly, the API function you are describing is exchanging an authorization code (appended as a query parameter by HubSpot to your app's installation redirect URL) for an access token and a refresh token (POST /oauth/v1/token, where documentation can be found under "Tokens" heading within "Endpoints" tab on this page).
The actual mechanism that makes this call is completely up to you, and likely will depend on the tech stack you are using to build your app (might be Node.js, or maybe Python's Flask -- HubSpot's API documentation has examples in languages/frameworks such as cURL, Node.js, PHP, Ruby, Python, C#). It is possible (though not recommended outside of initial testing) to simply make these OAuth API calls yourself manually using an API testing tool like Postman.
I hope that proves helpful. I know OAuth can a tricky nut to crack the first time around. Stick with it 🙂
It sounds like you might be up to "Step 4: Exchange authorization code for tokens" with your app, but I'd recommend going through the entire guide from start to finish, to make sure you understand the ins and outs of OAuth for HubSpot.
Addressing your question directly, the API function you are describing is exchanging an authorization code (appended as a query parameter by HubSpot to your app's installation redirect URL) for an access token and a refresh token (POST /oauth/v1/token, where documentation can be found under "Tokens" heading within "Endpoints" tab on this page).
The actual mechanism that makes this call is completely up to you, and likely will depend on the tech stack you are using to build your app (might be Node.js, or maybe Python's Flask -- HubSpot's API documentation has examples in languages/frameworks such as cURL, Node.js, PHP, Ruby, Python, C#). It is possible (though not recommended outside of initial testing) to simply make these OAuth API calls yourself manually using an API testing tool like Postman.
I hope that proves helpful. I know OAuth can a tricky nut to crack the first time around. Stick with it 🙂