Generating Access Tokens using client credentials

Published on: 23-12-21 06:01pm

Himani Gupta

نشرت في - 23-12-21 06:01pm

How to generate access tokens using client credentials?

You can use client credentials details to interact with the REST API of UVdesk using OAuth 2.0 standard. The client-server authentication model followed is as

per "The OAuth 2.0 Authorization Framework proposed in RFC 6749"

Where can you get client credentials?

Admin(s) can get API client credentials by Login into Admin Panel >> Search Api Client From Search bar >> Visit Api Client Page. You can Copy/Generate Client credentials details for API, from there.

UVdesk API supports Authorization Code grant, Password Grant, and Refresh Token grant.


Resource owner/Password Grant

The Password grant type (User Credentials/ Password Credentials) could be used to access data from UVdesk by providing client credentials directly.

Example Request:

Send credentials as given below to get Access token:

curl -d 'client_id=TestClient&client_secret=TestSecret&grant_type=password&username=zondo&password=mypassword'


Authorization Code grant

First, redirect the user to the following URL:

Successful authorization will pass the authorization code in the URL via valid supplied redirect_uri:

Use this code to request access token

Finally,  successful request will return access token in JSON format:



Refresh Token Grant

Often Access Token have limited lifetime. In UVdesk, Access tokens have default lifetime of 2 months. To Increase lifetime of Access Tokens, corresponding refresh Tokens can be used.

Example Request:

curl -d 'client_id=TestClient&client_secret=TestSecret&grant_type=refresh_token&refresh_token=G5QY2potGz3JOkF0XlKWIA'

تعذر العثور على إجابة؟

تبحث عن أي مادة محددة التي توجد في الاستفسارات العامة؟ مجرد تصفح مختلف المجلدات والفئات ذات الصلة وبعد ذلك سوف تجد المادة المطلوبة.

اتصل بنا

Confirm Action

Are you sure? You want to perform this action.