mondaycom / monday-sdk-js

Node.js and JavaScript SDK for developing over the monday.com platform
https://monday.com
MIT License
87 stars 39 forks source link

Adds optional redirect_uri to oauthToken function to fix "invalid_grant" error #47

Closed chris-packett closed 10 months ago

chris-packett commented 3 years ago

See: https://monday.com/developers/apps/oauth

Navigate to: Token request -> Request Structure and Examples -> redirect_uri section.

You'll see it states: This parameter is used for validation only (there is no actual redirection). The value must match the value supplied in the Authorization Request step.

SamuelPinho commented 2 years ago

Since this wasn't merged yet, you can call the OAuth request URL for yourself instead of calling the monday.oauth method and pass the redirect_uri param like this:

https://auth.monday.com/oauth2/authorize?client_id=<CLIENT_ID>&redirect_uri=<YOUR_URL>