How to Issue a Service Token
Here’s a step-by-step guide on how to issue a service token in Oz API 5 and 6.
Step 3
Create a service user. Call {{host}}/api/users/
and write down user_id
that you will get in response.
Example request
Example response
As in API 6.0, the logic of issuing a service token has slightly changed, here are examples for both API 6 and API 5 (and below) cases.
API 6
In the request body, define user_type
as CLIENT_SERVICE.
API 5 and below
Set the is_service
flag value to true.
Step 4
If you need to obtain the service token to use it, for instance, with Web SDK, authorize as ADMIN (same as in Step 1) and call:
API 6:
{{host}}/api/authorize/service_token/{user_id}
withuser_id
from the previous step.API 5 and below:
{{host}}/api/authorize/service_token
.
Example request
Example response
In response, you will get a service token that you can use in any service processes.
Last updated
Was this helpful?