KSA v2: Sign in

Sign in to your Complyance account with your refresh token and get the access token the other KSA ZATCA API v2 requests need. This page documents API v2, a legacy version.

Use this API to sign in to your Complyance account and get an access token for the other Complyance APIs. You need the refresh token you received when you signed up.

Send every required parameter in the format shown below.

Endpoint

http
POST https://<your-v2-api-host>/api/v1/proto/signIn

Use the v2 API host you were given when your account was set up. If you no longer have it, contact support@complyance.io.

Examples

Sign inbash
curl -X POST https://<your-v2-api-host>/api/v1/proto/signIn \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"refreshToken": "eyJjdHkiOiJKV1QifQ.example-refresh-token.signature"}'

Request parameters

ParameterRequiredTypeDescriptionExample
refreshTokenYesstringThe long-lived token you received when you signed up. It is valid for one year from the time it was created.eyJjdHkiOiJKV1QifQ.example-refresh-token.signature
Request bodyjson
{
  "refreshToken": "eyJjdHkiOiJKV1QifQ.example-refresh-token.signature"
}

Response parameters

ParameterTypeDescriptionExample
accessTokenstringA temporary token, valid for one day from the time it was created. Send it in the Authorization header to use the other Complyance APIs.eyJhbGciOiJSUzI1NiJ9.example-access-token.signature
Responsejson
{
  "accessToken": "eyJhbGciOiJSUzI1NiJ9.example-access-token.signature"
}

Next step

Generate an API key with the access token.