Token

Authenticated shopper token (Digital River hosted shopper)

Use this ROPC (Resource Owner Password Credentials) Grant OAuth flow when Digital River maintains the shopper's login and password. <br> <br> Request a full access token for the authenticated shopper by providing the shopper's username and password. Use the Client Credentials Grant OAuth flow if the Digital River partner maintains the shopper login and password credentials. <br> <br> The authenticated shopper token will expire after a period (86400 seconds by default). If the shopper wants to continue the shopping flow after the token expires, use the refresh_token grant type with the refresh token from the previous create token response to get a new authenticated shopper token to continue. Or use the shopper's credentials and password grant type to create a new authenticated shopper token. <br/> <br/> Security requires HTTP basic authentication (base-64 encoded), a user API key, and a password (secret key). <br> <br> <b>Important</b>: Never expose or visibly display the Limited or Full Access Tokens requested by the APIs to the customer (such as plain text in a cookie). Suppose a customer has access to these tokens. They could bypass any restrictions built into the store frontend and place orders directly on our systems via publicly documented APIs.

post/oauth20/token (DR hosted shopper)

Request

  • Base URL
    https://api.digitalriver.com
  • URL
    https://api.digitalriver.com/oauth20/token (DR hosted shopper)
  • Auth
    none declared

Request body application/x-www-form-urlencoded

dr_limited_tokenstring

Provide the limited access token used to identify the anonymous shopper session when transferring the anonymous shopper session and shopping cart to a specific authenticated shopper.

dr_session_tokenstring

Provide the shopper's session-aware token for a Digital River-hosted solution when transferring the shopper session and shopping cart to a specific authenticated shopper.

grant_type'client_credentials' | 'password' | 'refresh_token' required

Use "password" as the grant type when an anonymous shopper or Digital River maintains the shopper's login and password credentials. Use "refresh_token" as the grant type to continue the shopping flow for the previous shopper.

passwordstring required

Valid only for ROPC grant types. A shopper's password is required when creating an authenticated shopper token.

usernamestring required

Valid only for ROPC grant types. A shopper's username is required when creating an authenticated shopper token.

Response

Successful response.

access_tokenstring
token_typestring
expires_instring
refresh_tokenstring

Example response

{
  "access_token": "your_access_token",
  "token_type": "bearer",
  "expires_in": "3599",
  "refresh_token": "your_refresh_token"
}

Changes

No recorded changes to this operation across all 1 revision of this API.