Skip to content

How to use Oauth with client #520

Discussion options

You must be logged in to vote

Hi @PierreBtz, thank you for the detailed answer with the example. The problem for me was how to generate such a token 😅
Step by step for others:

  1. Create an OAuth client via Zendesk -> Admin Center -> Settings ->Apps and Integrations -> Zendesk API -> OAuth clients -> Add
  2. Next list the clients via Rest API: GET /api/v2/oauth/clients and copy the id of you new client
  3. Generate token with scopes for the client via Rest API: POST /api/v2/oauth/tokens with body:
{
    "token": {
        "client_id": "COPIED_ID",
        "scopes": ["read", "write", "impersonate"]
    }
}

Copy the full_token from the response
4. Create your Zendesk client:

        Zendesk zendesk = new Zendesk.Builder("https:/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mzawalski-vilisoft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants