What are my credentials for API access when using SSO to sign in?

Return to top
Have more questions? Submit a request

8 Comments

  • Travis DePuy

    Hello, I think this article needs more details. I banged my head on the desk trying to figure out why I kept getting this:

    {"error":"Couldn't authenticate you"}

    As it turns out the "/token" is explicitly required, it's not just a place holder for the token. Here is a working curl request:


    TOKEN="MYREALLYLONGTOKENHERE"

    USERNAME="user@domain.com/token:"$TOKEN

    curl -X GET -u "$USERNAME" https://instance.zendesk.com/api/v2/help_center/en-us/categories/433262820-some-category/articles.json

    Replace "MYREALLYLONGTOKENHERE" and "user@domain.com" with the appropriate details, but keep the /token. And note that your password is not used anywhere. 

    Hopefully this helps others. 

     

    0
  • Bryan - Community Manager
    Zendesk Developer Support

    This does help. Thanks Travis for sharing!

    There was a recent documentation refresh in the area that talks about the "/token" authentication method -- for reference it's here under API token in the developer reference documentation.

    There's also this article: Authentication for API requests

    And this is also a good community thread about them: Are API tokens user specific or account wide?

    Sorry for the frustration but hopefully the above links help round out the picture a bit more.

    0
  • Mark van Beekum

    This helped me too.

    I got stuck on the documentation below. Does it not work for SSO?

     

    Use the following format for the credentials:

    {email_address}/token:{api_token}

    Example:

    jdoe@example.com/token:6wiIBWbGkBMo1mRDMuVwkw1EPsNkeUj95PIz2akv
    

    After base64-encoding the resulting string, add it to the Authorization header as follows:

    Authorization: Basic amRvZUBleGFtcGxlLmNvbS90b2tlbjo2d2lJQldiR2tCTW8xbVJETXVWd2t3MUVQc05rZVVqOTVQSXoyYWt2
    0
  • Bryan - Community Manager
    Zendesk Developer Support

    Hi Mark van Beekum. If you're asking about the {email_address}/token:{api_token} format, this is specific to Zendesk Support's native authentication.

    If you're using an SSO option to authenticate and log into Zendesk, you'd want to conform to the standards needed with your SSO provider. See SSO options in Zendesk for more. Does that help?

    1
  • Shweta

    I followed this pattern  {email_address}/token:{api_token}, but I'm still getting CORS error. We're using an SSO option to authenticate. However, I couldn't find any specific issue as to what's going wrong. Can you please help? Let me know if any additional details required from my end.

    0
  • Raghav Mishra

    How can I extract OAuth tokens for my users (zendesk agents) if they're all connected via SSO? I'm using Okta (SAML) to SSO into Zendesk. It's not possible for me to get the API tokens for all my agents. What is the best way to get the OAuth tokens for these agents? 

    Note: I have a custom login, where my agents login using their OKTA credentials. I can hold these credentials and use them to get the Zendesk token as well, if there is a way to get my Auth token for the agent. (using their credentials) .

    0
  • Dwight Bussman
    Zendesk team member

    Hi Schweta & Raghav
    Both of these seem like excellent questions that will likely require a closer look by our support team. Please reach out to customer support as documented in this article to get some direct assistance with these cases, as I suspect they may require account-specific details to troubleshoot properly.

     

     

    1
  • Raghav Mishra

    Thanks for the update Dwight Bussman

    0

Please sign in to leave a comment.

Powered by Zendesk