Using a token in an API call

  • If you have the access token issued according to the OAuth's authentication process, you can use the access token issued upon the API call.
  • This guide walks you through the development process on how to call the API using the issued access token.

Using an access token for an API call

  • You can now use the API with the successful issuance of the access token.
  • - Request format and sample of API call
Request format of API access token

GET endpoint API HTTP/1.1
Host: {{mallid}}
Authorization: Bearer {access_token}

Request sample

curl -X GET \
'https://{{mallid}}' \
  -H 'Authorization: Bearer 4H8OBY2QQWSg7EcYDlcBKD'

  • - Error Response format and sample
  • Provides an error response to redirect_uri.
Error Response sample

HTTP/1.1 401 Unauthorized

WWW-Authenticate: Bearer authorization_uri=https://{{mallid}}, error={error}, error_description={error_description}
    "error": {
        "code": 401, 
        "message": "{error_description} ({error})"
Error Response sample
Key Description
error The error code value defined in section 3.1 of the OAuth 2.0 authorization framework.
error_description A detailed description of the error.
Error Response sample
Error code Description Client operation
invalid_request Incorrect request format Please correct your request and resubmit.
invalid_token Wrong or expired access token.
Check the details of the error description.
Have the access token reissued.