This tutorial explains how to enable OAuth 2.0 authorization for a REST request.
To configure OAuth 2.0 authorization, you need to:
Create and configure an authorization profile.
Retrieve an access token.
First, you need to add an OAuth 2.0 authorization profile:
Open a REST request.
Open the Auth panel:
Click Add Authorization Profile:
In the resulting dialog, select the OK:
type and enter the profile name. Click
After you add the authorization profile, you need to get an access token from the server. In this tutorial, you get it by using the Authorization Code grant type:
Expand the Get Access Token drop-down list.
Specify the authorization data. For a reference about the required parameters, see the OAuth 2.0 Grant Types section.
Click Get Access Token:
Note
ReadyAPI users are now able to add the Audience parameter to the OAuth request, if required.
ReadyAPI will get the access token from the server and display it in the Access Token field:
![]() |
Note
From version 3.42, you can use and insert Property Expansions in the Authentication types via the Get Data menu.
![]() |
![]() |
OAuth 2.0 tokens can change from time to time. To avoid the need to update them manually, you can configure ReadyAPI to check if a token is up-to-date before sending a request and retrieve the token automatically. For more information about automating token retrieval, see the Automating Token Retrieval section.