Recent searches
No recent searches
Zendesk Oauth Flow: Does Zendesk Oauth Flow has support for user to choose the subdomain of their workspace?
Posted Apr 04, 2023
hi,
I am working on a Oauth App that will authorise with Zendesk and Get the Zendesk tokens.
I see that we need to redirect user to below URL to start the auth flow.
https://{subdomain}.zendesk.com/oauth/authorizations/new?response_type=code&client_id={client_id}&redirect_uri={redirect_uri}&scope={scope}
I see that this needs {subdomain} as the input from User.
This will add an additional step on developer side to ask user its workspace subdomain.
Is there a way to skip/avoid that? Does zendesk provide an auth flow which also takes care of user selecting subdomain?
Or it is on developer to get the {subdomain} from user first then proceed with auth flow.
0
1
1 comment
James Rodewig
Hi Nishaant,
Thanks for reaching out.
The Using OAuth to authenticate Zendesk API requests in a web app article is currently misleading about this. I apologize for the error (it was my mistake), and I'm working on fixing it now. In the meantime, I hope this information is helpful.
By default, OAuth clients are scoped to one Zendesk subdomain. You can only use the client to create OAuth flows on behalf of users who are on the same subdomain used to create the client.
If you're creating an app that serves users on multiple Zendesk subdomains, you'll need to request a global OAuth client. In this case, you'd need some mechanism to capture the user's subdomain. When a user signs in to Zendesk, they must sign into a specific Zendesk subdomain.
I hope that helps!
0