Step 5 - Authorize the integration
Now we need to provide credentials so Lightyear can make API calls to HubSpot on behalf of this user.
Start authorization
Click the "Authorize" button next to the HubSpot integration:
0
OAuth authorization flow
In a production environment, clicking authorize would redirect your user to HubSpot's OAuth page:
0
Manual authorization for testing
Since HubSpot uses OAuth2, the normal flow would redirect users to HubSpot to grant permissions. For testing purposes, you have a few options:
- Use the API: Call Lightyear's API to set the access token directly
- Complete the OAuth flow: If you have OAuth credentials configured
- Use a test token: For development, you can manually set the private app token
For this tutorial, we'll use the command-line script to handle authentication programmatically.
Authorization status
Once authorized, the integration status will change to "AUTHORIZED":
0
Production considerations
In a real application:
- Users would complete the OAuth flow in your app
- You'd use Lightyear's OAuth endpoints to handle the redirect
- Tokens would be refreshed automatically
- Users wouldn't see Lightyear's branding (if using custom apps)
What's next?
Now comes the fun part - let's build a command-line script that uses the Lightyear API to create companies in HubSpot!