-
Notifications
You must be signed in to change notification settings - Fork 647
Description
Bug Description
When completing the Instagram OAuth flow, the token exchange step fails with an instagram_token_request_error. Instagram's token endpoint (https://api.instagram.com/oauth/access_token) only accepts POST requests, but it appears Nango is sending a GET request during the token exchange.
Error
AuthError: {
"name": "Error",
"message": "An unhandled error of type 'instagram_token_request_error' with payload '"{ "message": "Request failed with status code 400", "name": "AxiosError", "provider_error_payload": { "message": "Unsupported request - method type: get" } }"' has occurred"
}
Steps to Reproduce
- Configure an
instagramintegration with valid Instagram App ID and Secret (from the Meta Developer Portal "Manage message & content on Instagram" use case) - Create a connect session and initiate
nango.auth('instagram')from the frontend SDK - Complete the Instagram OAuth consent screen
- Token exchange fails with the above error
Expected Behavior
Nango should send a POST request to Instagram's token endpoint (https://api.instagram.com/oauth/access_token) with client_id, client_secret, grant_type, redirect_uri, and code as form-encoded body parameters.
Environment
- Nango Frontend SDK:
@nangohq/frontend(latest via CDN) - Integration:
instagram(built-in) - Instagram API: Instagram Basic Display / Instagram Login