KSA v2: Generate an API key
Generate the API key that the KSA ZATCA API v2 requests use, with the access token you get when you sign in. This page documents API v2, a legacy version.
After you sign in, generate your API key with a GET request to the API key generation endpoint. Send your access token in the Authorization header. The response contains your API key, which is valid for one year.
Request parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
Authorization | string | The access token you received when you signed in. | eyJhbGciOiJSUzI1NiJ9.example-access-token.signature |
env | string | The environment. | sandbox |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
message | string | A description of the status of the request. | API key created and linked to the specific API successfully! |
apiKey | string | The generated API key. | EXAMPLEapiKEY00000000000000000000000000 |
Next step
Onboard your EGS with the API key.