Using API clients
See the latest documentation of how to authenticate API calls using API clients in the developer portal.
Using integration users (deprecated)
Deprecated
This feature is now deprecated since September, 2023.
Important
As of September 2023, authentication with APIs must be done via API clients and NewStore will stop supporting authenticating with integration users soon. Follow the migration guide if you already use integration users.
Authentication is managed in an OAuth 2.0 compliant way.
To authenticate:
To get an access token from NewStore Omnichannel Cloud, use the
curlcommand or theJSONpayload described below:curl -i -X POST -d'username={{username}}&grant_type=password&password={{password}}' https://{{tenant}}.p.newstore.net/v0/tokenOR
{ "url":"https://tenant.p.newstore.net/v0/token", "method":"post", "headers": { "Content-Type":"application/json" }, "data": { "grant_type": "password", "username": "email", "password": "password" } }where:
usernameis your usernamepasswordis your passwordImportant
Do not use the query parameter as the password, otherwise the request fails.
tenantis typically the name of your company + a stage variable. For example:mycompany-sandboxmycompany-stagingmycompany(production)
Include the returned token in the
Authorizationheader of a request:Authorization: Bearer <access token from the response above>Test the authentication by sending the request.
If you omit the
Authorizationheader, the request returns aHTTP 401status code.If the token in the
Authorizationheader is expired (or is otherwise not valid), the request returns aHTTP 403status code.If the query parameter is used as the password, the request returns a
HTTP 400status code with the following error message:Query parameter password is not allowed.
For more information, see the API docs. If you have technical issues with authentication, contact the support team.