Token API (Deprecated) (v0)
Download OpenAPI specification:Download
Use this API to issue tokens used for authentication to communicate with the NewStore platform.
Warning: This API version is deprecated since January 8th, 2024.
We recommend that all existing integrations use API Clients with the Client Credentials Grant. Please use the migration guide to migrate to the API Clients.
Get access token Deprecated
Provides an access token when the provided credentials are valid.
DEPRECATED
Deprecation date 08-01-2024
Please use API Clients with the Client Credentials Grant.
Request Body schema: application/x-www-form-urlencoded
grant_type required | string Default: "password" Value: "password" The type of credentials provided: password - username and password are required to be successfully authenticated. |
username required | string The username to be authenticated, can be an email. This is required if grant_type = 'password', ignored if not. |
password required | string <password> The password corresponding to the user to be authenticated. This is required if grant_type = 'password', ignored if not. |
Responses
Response samples
- 200
- 400
- 403
- 500
{- "refresh_token": "Z4tuV3lC4EvMV1X5A3HsB_VUBxmtlj5JtmUbtfQtWI538",
- "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFQqTFSVEEwTVVSQ05qWXpNVGhFT0RZeE5UVTVSakl6TTBFd05qQkJNVGd4UVRnNE1VUkROQSJ9.eyJodHRwOi8vbmV3c3RvcmUvbmV3c3RvcmVfaWQiOiIzUzQwTXFrTnlNTGJPTE5HcUY2UnljIiwiaHR0cDovL25ld3N0b3JlL3JvbGVzIjpbIm5ld3N0b3JlX2FkbWluIl0sImlzcyI6Imh0dHBzOi8vZGV2LW5ld3N0b3JlLmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHw1OTZjOGY5NTc5MDgzNzQ4OWY0YzE5MWMiLCJhdWQiOiJodHRwczovL2Rldi1uZXdzdG9yZS5hdXRoMC5jb20vYXBpL3YyLyIsImlhdCI6MTUxNTY1ODI2NCwiZXhwIjoxNTE1NzQ0NjY0LCJhenAiOiJ0d2xGVlp5VElZYng3Z0ZkdEdZYktBdkNHblpBdTRZdyIsInNjb3BlIjoicmVhZDpjdXJyZW50X3VzZXIgdXBkYXRlOmN1cnJlbnRfdXNlcl9tZXRhZGF0YSBkZWxldGU6Y3VycmVudF91c2VyX21ldGFkYXRhIGNyZWF0ZTpjdXJyZW50X3VzZXJfbWV0YWRhdGEgY3JlYXRlOmN1cnJlbnRfdXNlcl9kZXZpY2VfY3JlZGVudGlhbHMgZGVsZXRlOmN1cnJlbnRfdXNlcl9kZXZpY2VfY3JlZGVudGlhbHMgdXBkYXRlOmN1cnJlbnRfdXNlcl9pZGVudGl0aWVzIG9mZmxpbmVfYWNjZXNzIiwiZ3R5IjoicGFzc3dvcmQifQ.XmkWhs2ww6ptiZEEOx3jouFPLwTiG4hfGczy5cpLH7ogXE3ZM9pQGQL3oXqXn1iBMdXMF6Aq-fPI6WE8_PmwC5pKnFuw-lwQ0e3bdYJ3XkYErSju5LQY_Dmmugvv-cBRANgyc8suWF0-AQVLeZF8ktnnI5FFZGMBTOJExMkKDTlgnfITWsoBi4abXtB2NminHfmmwP7RKQMK1ABAaNklNaCX7bPEYaquBaaurXF6E-KoBx0fyk3dKv4y2E6LEcEFmAGxRE8bEcgSmVFSDFOgOF1AAfdH8OCwBS6-i9yT7T5IeVF7rREeVuOgxruD3unJxJYfCD9U3fWfGucRuMFWZA",
- "token_type": "Bearer",
- "scope": "read:current_user update:current_user_metadata delete:current_user_metadata create:current_user_metadata create:current_user_device_credentials delete:current_user_device_credentials update:current_user_identities offline_access",
- "expires_in": 86400
}
Refresh access token Deprecated
Provides an access token when the provided refresh_token is valid/not expired. See RFC 6749 Section 6 for details how to use refresh tokens.
DEPRECATED
Deprecation date 08-01-2024
Please use API Clients with the Client Credentials Grant.
Request Body schema: application/x-www-form-urlencoded
grant_type required | string Default: "refresh_token" Value: "refresh_token" The type of credentials provided: refresh_token - provides a new access token for a valid refresh token. |
refresh_token required | string The refresh token, as received by an authentication to /v0/token |
Responses
Response samples
- 200
- 400
- 403
- 500
{- "refresh_token": "Z4tuV3lC4EvMV1X5A3HsB_VUBxmtlj5JtmUbtfQtWI538",
- "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImt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E-KoBx0fyk3dKv4y2E6LEcEFmAGxRE8bEcgSmVFSDFOgOF1AAfdH8OCwBS6-i9yT7T5IeVF7rREeVuOgxruD3unJxJYfCD9U3fWfGucRuMFWZA",
- "token_type": "Bearer",
- "scope": "read:current_user update:current_user_metadata delete:current_user_metadata create:current_user_metadata create:current_user_device_credentials delete:current_user_device_credentials update:current_user_identities offline_access",
- "expires_in": 86400
}