POST token
POST/token
Request the bearer token that every other request needs.
The operations of the shopapi/v3 require a bearer token to access the data. For each client a separate username and password can be requested which in turn can be used to request a bearer token for accessing the endpoints. The same bearer token will grant access to all shopapi/v3 endpoints and older, but only to the information of the client it belongs to. and need to be provided to the Token operation. This operation will
return a token string which needs to be provided in the header of each request.
It is not required to request a tokens for each and every API call. It is recommended to store the token until it expires. Be aware that a token can potentially be invalidated before it actually expires in case of intrusion detection. If this happens requests will return a 401 Unauthorized error and a new token must be requested.
Request
Responses
- 200
- 400
- 404
A successful authorization response has the token and expiration date (expires) among other useful values.
400 Unauthorized
A 400 Not Found response occurs when attempting to request a token with an invalid username or password.
A 404 Not Found response occurs when attempting to access a resource
that cannot be found on the server. It indicates that the requested
resource does not exist, either because it has been deleted, the URL is
incorrect or because the endpoint has not been realized.
The following are common scenarios that may lead to a 404 Not Found
response:
-
Attempting to access an endpoint with an invalid or non-existent URL.
-
Attempting to access an endpoint that has not (yet) been realized
-
Requesting a resource that has been deleted or moved.