Access Token Retrieval

After adding an OAuth 1 profile to a request, you can enter an existing access token, retrieve a new token from the server, or configure how the profile handles access and refresh tokens.

OAuth 1 authorization requires the Access Token and Token Secret values.

Retrieving an OAuth 1 Access Token

  1. In the Navigator, in Functional tests, expand Project, Test Suite, Test Case, and select Request.

  2. In the request editor, select the Auth tab at the bottom of the Request panel.

  3. Click Get Access Token.

    ReadyAPI Authorization panel showing the MyProfile OAuth 1.0 profile selected. The Access Token field is empty with a prompt to enter an existing token or click "Get Access Token". The Get Access Token option is highlighted in orange. The Token Secret fie
  4. The Get access token from the authorization server form opens. Enter the following details:

    RAPI_Screenshot_OAuth1_Get_Access_Token_Form.png
    Table 46. Get access token form fields

    Field

    Description

    Consumer Key

    The identification string for the client application, generated by the service provider - the API from which you retrieve data.

    Consumer Secret

    The secret string for the client application. The service provider generates this value.

    Temporary Token URL

    URLThe URL used to obtain the access token (also called the request token URL).

    Authorization URL

    The URL of the authorization server.

    Access Token URL

    The URL used to obtain the access token.

    Redirect URL

    The URL used to return the access token after authorization.



OAuth 1 Advanced Options

The Advanced button opens the OAuth 1 Advanced Options dialog, where you specify how the access token is sent.

ReadyAPI OAuth 1 Advanced Options dialog showing a description "Defines advanced options for fetching and sending an access token". The "Send Authorization Parameters As" option is set to "Header" (selected) with "Query" as an alternative. OK and Cancel b
Table 47. OAuth 1 Advanced Options - Send Authorization Parameters

Option

Description

Example

Header

The access token is sent as a request header.

Authorization: Bearer YOUR_ACCESS_TOKEN

Query

The access token is sent as a query parameter.

https://www.example.com/a/v1/y/{userId}?access_token=1/YOUR_ACCESS_TOKEN



Note

The 1/ prefix in the Query example is part of the OAuth 1.0 token format. Your actual token value follows this prefix. The Header example uses the Bearer token format, which does not include this prefix.

See Also

Publication date: