- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Integration question (for developers): Custom parameters in redirect_uri?
With the globally set redirect url in the dashboard, how can I detect on my server, which user it is who has authorised my app to access Square on their behalf, after directing them to the oauth2/authorize endpoint?
With other integrations I've done, it's possible to specify a redirect url on a case-by-case basis, in which I include custom parameters in the query string.
Many thanks in advance for any advice 🙂
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hey @SqDeveloper! Welcome to the Community.
I reached out to the API team with this and they replied with the following:
After they authorize (oauth2/authorize) they will pass the code they receive to ObtainToken. The response from ObtainToken will include things such as a merchant_id that would help them identify who it was that just authed (https://developer.squareup.com/reference/square/oauth-api/obtain-token). Also once they auth successfully, they can of course use the access token to call the APIs such as ListLocations which will return things like the business name: https://developer.squareup.com/reference/square/locations-api/list-locations.
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report