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}}.cafe24api.com
Authorization: Bearer {access_token}


Request sample

curl -X GET \
  'https://{{mallid}}.cafe24api.com/api/v2/oauth/shops' \
  -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={authorization_uri}, error={error}, error_description={error_description}
{"error":{error},"error_description":{error_description}}

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.