Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

An OAuth Client is a token-based method of authentication which allows a third-party application to access CX platform API using OAuth protocol.

Step 1: Get the Client ID of OAuth Client

(1)Log in to your Cloudfon CX Control Panel.

(2)From the left navigation menu, go to Global Settings > Security > OAuth Client.

(3)If OAuth Client has been created already, just click Action >Edit, then get the Client ID. Otherwise, Click New OAuth Client.

(4)Enter the following OAuth Client details, and click Save:

  • Client name: The Client name is displayed to users when asked to grant access to your application or when viewing all apps that have been granted access.

  • Description: A short description of your Client for users to consider access to your application.

Your OAuth Client is successfully created and listed on the OAuth Client page, and get the Client ID from the OAuth Client.

Step 2: Get the OAuth Access Token

To get the OAuth Access Token, follow these steps(Postman or CURL):

Postman

(1)Log in to Postman.

(2)Go to Home > Create New > HTTP Request.(Menu might be differect on different Postman version)

(3)Select the POST method and provide the URL. While generating an access token, the API request should start with your platform domain followed by the curl command, which is different from other API requests. For example, if your Control Panel domain is cx.cloudfon.net:9001, the API request should be https://cx.cloudfon.net:9001/oauth/token.

(4)Go to Body > x-www-form-urlencoded tab.

(5)Input the following Keys and their Values.

For example:

  • email: XXXXXXXX

  • password: XXXXX

  • grant_type: password

  • client_id: XXXXXX

  • Note: Client ID is from Step 1: Get the Client ID of OAuth Client

(6)Click Send. You get the OAuth Access Token to call APIs.

(7)Copy the OAuth Access Token to your clipboard.

Step 3: Use the OAuth Access token & client ID to call an API

To call an API using the OAuth Access Token, follow these steps(Postman or CURL):

Postman

(1)Select the GET method and provide the API request URL.

(2)Go to the Authorization tab and choose the authentication type as OAuth 2.0.

(3)Paste the OAuth Access Token in the Access Token field.

(4)Ensure that the Header Prefix field is Bearer.

(5)Click Send.

  • No labels