TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Get a temporary request token

POSThttps://api.testingapis.com/api/auth/oauth1/request_tokenSign in to see this endpoint's URL

Get a temporary request token (step 1 of the three-legged flow).

Sign with the consumer credentials only; sending an oauth_token is rejected. oauth_callback is required: an http(s) URL, or oob to have the verifier shown instead of redirected. In Postman, leave the token fields empty and fill in Callback URL under Advanced.

Response: application/x-www-form-urlencoded by default, or JSON when the request sends Accept: application/json. The request token expires after 10 minutes. Next: open GET /api/auth/oauth1/authorize?oauth_token=<request token>.Response: application/x-www-form-urlencoded by default, or JSON when the request sends Accept: application/json. The request token expires after 10 minutes. Next: open GET …<request token>.

OAuth 1.0a signature with the consumer credentials only: apibee-consumer-key / apibee-consumer-secret

Parameters 8

NameTypeDescription
oauth_consumer_keyrequiredheader · stringapibee-consumer-key. In the Authorization: OAuth header, the query string or a form body (one place only).
oauth_callbackrequiredheader · stringAn absolute http(s) URL to redirect to after authorization, or oob to get the verifier as JSON.
oauth_signature_methodrequiredheader · stringHMAC-SHA1, HMAC-SHA256, HMAC-SHA512 or PLAINTEXT.
oauth_signaturerequiredheader · stringSigned with the consumer secret only: the signing key is consumer_secret& (empty token secret). For PLAINTEXT, send apibee-consumer-secret%26.
oauth_timestampheader · stringUnix time in seconds, within 5 minutes of server time. Required for the HMAC methods; may be left out for PLAINTEXT.
oauth_nonceheader · stringA random string; each one works once. Required for the HMAC methods; may be left out for PLAINTEXT.
oauth_versionheader · stringOptional. If sent, it must be 1.0.
Acceptheader · stringapplication/json for a JSON response. Without it the response is application/x-www-form-urlencoded.

Responses

200
oauth_token, oauth_token_secret, oauth_callback_confirmed=true and oauth_expires_in (600).
400
parameter_absent (no oauth_callback), parameter_rejected (a bad callback, or an oauth_token was sent), or another protocol parameter problem.
401
consumer_key_unknown, timestamp_refused, nonce_used or signature_invalid.

Example

Request
curl -X POST "https://api.testingapis.com/api/auth/oauth1/request_token" \
  -H "Accept: application/json" \
  -H 'Authorization: OAuth oauth_consumer_key="apibee-consumer-key", oauth_signature_method="PLAINTEXT", oauth_callback="oob", oauth_signature="apibee-consumer-secret%26"' \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "oauth_token": "o1rt_6112c483e357a56ceb9ea6d5fc7bc9e31e89b4ae",
  "oauth_token_secret": "o1rs_e2e13614310bf304d0cec178961363cc9928cb74",
  "oauth_callback_confirmed": "true",
  "oauth_expires_in": "600"
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.