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
- 401
- 404
OK
401 Unauthorized
A 401 Unauthorized response occurs when attempting to access a resource or perform an action that requires authentication, but no valid credentials have been provided. It indicates that the requester is unauthorized to access the requested resource.
The following are common scenarios that may lead to a 401 Unauthorized response:
- Attempting to access a protected API endpoint without providing authentication credentials.
- Providing an invalid or expired authentication token.
- Providing valid authentication credentials, but lacking sufficient privileges to access the requested resource.
- Providing authentication credentials that are valid for a different resource or API endpoint than the one being requested.
404 Not Found
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.