Getting Started
...
UpStart Commerce APIs
Consumer APIs

Logged-In Bearer Token

9min

This section explains obtaining a Bearer Token for a logged-in customer and outlines how an anonymous user can register to access more exclusive functionalities for UpStart Commerce Consumer APIs.

Generate a Logged-In Bearer Token

Step 1: Register as a Customer

To begin, first register as a customer to establish a more permanent customer profile through our UpStart Commerce Portal UI. Access the portal and log in using your credentials (Email and Password). If you are not already registered, you can follow this link to create your sandbox account.

For details on creating and registering Customer, go to the Customer Management Guide.

Step 2: Obtain an Anonymous Token

To obtain a logged-in bearer token, you need to obtain an anonymous token. If you have not obtained an anonymous token , visit Anonymous Bearer Token Guide for detailed information.

Step 3: Obtain an Access and Refresh Token

Copy the Curl below to obtain an Access and Refresh token and replace the following values in the header.

  1. Replace and with your specific values in the header of your request.
  2. Replace your "Anonymous Bearer Token" generated in Step 2 within the "Authorization" header of your request. 
  3. Replace your "login" and "0password" with your specific values obtained while registering customers in the header.

Request:

Curl


For more information, go to the Log-In User endpoint example request.

Step 4: Check the Status Code

Upon making an access and refresh token creation request, it responds with a status code indicating the outcome.



Step 5: Access and Refresh Token Obtained Successfully

After executing the Curl above, you have successfully obtained a valid response for an "accessToken" and "refreshToken". Copy these values and paste them into the authorization field.

Response:

JSON


Access tokens serve as short-term credentials for accessing UpStart Commerce APIs, while Refresh tokens act as a mechanism to renew access tokens and maintain customer sessions over a more extended period during exploration.

Make Your First API Call with Logged-In Bearer Token

To make your first call by using a Logged-In Bearer Token, you need to replace your above obtained "Logged-In Bearer Token" in the request authorization header by using the Curl below.

Request:

Curl


Response:

JSON


For more information, go to the Get Customer Profile endpoint example request.

Upon receiving the successful response to the Get Customer Profile request, you have completed your first UpStart Commerce Consumer API call, using the logged-in bearer token.