# Get retailer authentication token **POST /api/oauth/v1/retailer/token** This endpoint allows you to get a retailer authentication token. No need to be authenticated to use this endpoint. ## Servers - https://content.winkelstraat.nl: https://content.winkelstraat.nl () ## Parameters ### Headers - **Authorization** (string) Equal to 'Basic xx', where 'xx' is the base 64 encoding of the client ID and a secret. The client ID and secret are available upon request. The last information is needed to use the REST API and generate a retailer token. To generate the value, you need to encode the client ID and the secret, in base64, with a `:` in between. ``` client_id:secret 4gm4rnoizp8gskgkk080ssoo80040g44ksowwgw844k44sc00s:5dyvo1z6y34so4ogkgksw88ookoows00cgoc488kcs8wk4c40s base64 encoded NGdtNHJub2l6cDhnc2tna2swODBzc29vODAwNDBnNDRrc293d2d3ODQ0azQ0c2MwMHM6NWR5dm8xejZ5MzRzbzRvZ2tna3N3ODhvb2tvb3dzMDBjZ29jNDg4a2NzOHdrNGM0MHM= ``` The `base64 encoded` value must be used to acquire an retailer access token. - **Content-type** (string) Equal to 'application/json', no other value allowed ## Responses ### 200 Return an authentication token #### Body: application/json (object) - **access_token** (string) Authentication token that should be given in every authenticated request to the API - **expires_in** (integer) Validity of the token given in seconds, 3600s = 1h by default - **token_type** (string) Token type, always equal to "bearer" - **scope** (string) Unused, always equal to "null" - **refresh_token** (string) Use this token when your access token has expired. For security reasons, access tokens have a certain lifespan. A client application using an expired token will be unable to request the REST API. After a token has expired, the client application can ask for a new token by calling: ``` curl -X POST https://content.winkelstraat.nl/api/oauth/v1/retailer/token -H "Content-Type: application/json" -H "Authorization: Basic YOUR_BASE_64_CLIENT_ID_AND_SECRET" -d '{ "refresh_token" : "REFRESH_TOKEN", "grant_type": "refresh_token" }' ``` ### 400 Bad request #### Body: application/json (object) - **code** (integer) HTTP status code - **message** (string) Message explaining the error ### 415 Unsupported Media type #### Body: application/json (object) - **code** (integer) HTTP status code - **message** (string) Message explaining the error ### 422 Unprocessable entity #### Body: application/json (object) - **code** (integer) HTTP status code - **message** (string) Message explaining the error [Powered by Bump.sh](https://bump.sh)