...
- Create a new REST Client and configure the settings for the location where the Request Token will be obtained.
- Click the HTTP Options and choose either HTTP 1.0 or HTTP 1.1 from the Transport menu.
- Click the OAuth 1.0 Authentication settings and enable the Perform Authentication option. The other fields necessary to complete the OAuth 1.0 Authentication configuration will become active.
- Enter the consumer key and consumer secret in the Consumer Key and Consumer Secret fields.
- Choose Obtain Request Token from the OAuth 1.0 Mode menu.
- (Optional) Specify a scope in the Scope field.
- (Optional) Add additional OAuth parameters under OAuth 1.0 Parameters.
- Attach a Text Data Bank to the Response Traffic of the REST Client and extract the Request Token and the Request Token Secret. The token is usually denoted as
oauth_token
. - Choose File > New > Test (.tst) File from the main menu and choose your project.
- Enter a name for the file and click Next.
- Choose Web > Record web scenario and click Next.
- Choose Record new web scenario and click Next.
- In the Start Recording From field, enter the URL to obtain the verification code. Add an
oauth_token
parameter and specify the value of the request token obtained in the step 8.
Once the browser launches, it will display the login page of the server that is hosting the protected resource. - Sign-in by providing the user's login credentials (Username/Password). Once authorized, the browser will redirect you to a new page with a verification code.
- After you see the verification code, exit the recording by closing the browser.
- Attach a Browser Data Bank to the Browser Contents (rendered HTML) and extract the value of the verification code.
- Open the Browser Playback tool and replace the literal Request Token string with the Request Token data source column generated by the Text Data Bank (step 7). Use the
${varName
} syntax, as shown below.
...
- Create a new REST Client and configure the settings for the location where the Request Token should be exchanged for the Access Token.
- Click the HTTP Options and choose either HTTP 1.0 or HTTP 1.1 from the Transport menu.
- Click the OAuth 1.0 Authentication settings and enable the Perform Authentication option. The other fields necessary to complete the OAuth 1.0 Authentication configuration will become active.
- Enter the consumer key and consumer secret in the Consumer Key and Consumer Secret fields.
- Choose Exchange Request Token for Access Token from the OAuth 1.0 Mode menu.
- Parameterize the Request Token and Request Token Secret fields from the Text Data Bank extractions.
- Parameterize the Verification Code field from the Browser Data Bank.
- Attach a Text Data Bank to the Response Traffic of the REST Client and extract the Access Token (usually denoted as oauth_token) and the Access Token Secret (usually denoted as oauth_token_secret).
...
- Create a new REST Client and configure the settings for the location where the Request Token should be exchanged for the Access Token.
- Click the HTTP Options and choose either HTTP 1.0 or HTTP 1.1 from the Transport menu.
- Click the OAuth 1.0 Authentication settings and enable the Perform Authentication option. The other fields necessary to complete the OAuth 1.0 Authentication configuration will become active.
- Enter the consumer key and consumer secret in the Consumer Key and Consumer Secret fields.
- Choose Sign Request for OAuth Authentication from the OAuth 1.0 Mode menu.
- Parameterize the Access Token and Access Token Secret fields from the Text Data Bank extraction.
- Request the user's private resources. This should be possible because the Access Token has been obtained.