OAuth 1 Authentication Tutorial

This tutorial explains how to enable OAuth 1.0 authorization for a REST request. To configure OAuth 1.0 authorization, complete the following steps:

  • Create and configure an authorization profile.

  • Retrieve an access token.

1. Add an Authorization Profile

Add an OAuth 1.0 authorization profile:

  1. Open a REST request.

  2. Open the Auth panel and click Add Authorization Profile.

    ReadyAPI Navigator panel showing REST Sample Project expanded with the Login request selected and highlighted in orange under Simple Login Call test case in the Sample REST Test Suite. The main editor shows Test Step Login as a GET request to the localhos
  3. In the Add Authorization Profile dialog, select OAuth 1.0 from the Type dropdown and enter a profile name. Click OK.

    ReadyAPI Add Authorization Profile dialog showing the Type dropdown set to "OAuth 1.0" and the Profile Name field set to "MyProfile". A placeholder hint below the field shows example names "Administrator" and "Server24". OK and Cancel buttons appear at th

    ReadyAPI adds a new OAuth 1.0 authorization profile to your project.

2. Get an Access Token

OAuth 1.0 requires an Access Token and Token Secret to access a protected resource. If you already have these values, enter them in the corresponding fields. If you do not have these values, follow these steps:

  1. Click Get Access Token.

  2. In the Get access token from the authorization server form, enter the following details and click Get Access Token. For details, see Access Token Retrieval.

    Table 48. Get access token form fields

    Field

    Example Value

    Consumer Key

    key1

    Consumer Secret

    secret1

    Temporary Token URL

    http://endpoint.example.com/OAuth1/Service/1/auth.ashx

    Authorization URL

    http://endpoint.example.com/OAuth1/Service/1/auth.ashx

    Access Token URL

    http://endpoint.example.com/OAuth1/Service/1/auth.ashx

    Redirect URL

    http://endpoint.example.com/OAuth1/Client



  3. ReadyAPI displays the login page of the service you are connecting to. Enter your credentials.

    ReadyAPI retrieves the Access Token and Token Secret values and automatically populates the corresponding fields. The OAuth 1.0 authorization profile is now ready to use in your requests.

See Also

Publication date: