Create redirect code programmatically
Mar 31, 2020 12:06 PM
Hello, I am trying to create an OAuth connection inside of a .NET application and wanted to make sure I have the correct process down. Are these the correct steps?
0. Authorize the Developer Application to reach the other HubSpot Application
- Get the "code" from the redirect_uri by making the call to https://api.hubapi.com/oauth/authorize with the correct query parameters
- Generate a token by making a call to https://api.hubapi.com/oauth/v1/token with the correct x-www-form-urlencoded parameters.
However, since the "code" value expires every 10 minuntes, I need to programmatically generate it but am unable to get the redirect url after making an API call. Do you all any same code that's not in Node I can use for reference for completely step 1?
Is this also the correct route or should I be authentication via the API Key?