OAuth 2.0 Configuration for REST service from Devtest workstation

Document ID : KB000012588
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

How to test OAuth 2.0 authorization for REST service through Devtest workstation?

Answer:

Devtest is not having any callback url to test Oauth 2.0 authorization for REST service. Instead you can use below options to achieve this testing.

Create two REST steps in test case (one is to get token-id and the next step is to send service request)

*)  To generate token from REST call, pass 3 additional parameters grant_type=client_credentials, client_id(optional) and client_secret (optional) to genrate token

          ex:     https://api.twitter.com/oauth2/token?grant_type=client_credentials&client_id=*************&client_secret=********************* 

*)   Once the token is generated, use the token in next REST service call.