How to get E-Invoicing KSA Auth Token?

Step 1 - Login to your ClearTax account

Sandbox -

Production account -

Step 2 - Go to “Settings” page

After logging into your account, click on the ‘Settings’ option at the bottom of the left-sided menu to view all the settings available.

Step 3 - Go to “Integrations- API Clients” page

Among the options available in the left-sided menu ‘Settings’, click on ‘Integrations’ and select the ‘API Clients’ option in that to open the page with API clients and auth token information.

Step 4 - Creation of new API Client

Click on ‘Create API Client’ at the top to create a new one.

a. Enter a name in the API Client Label text field which must be unique to this workspace.

b. Click on product i.e. EInvoice for which you want to create an API Client.

c. Set the expiration time as per your need (Suggested - set to Never Expires).

d. Click on create.

Step 5 - Save the generated client secret key

After clicking on ‘Create’ a new API client will be created. Save the API client generated for future use in a text file or somewhere where it can be accessed easily as this will not be available later.

Step 6 - Generate a new access token

After generating the API client click on ‘Generate Access Token’ to generate a new access token. Please remember to copy and save this. Once you move to another page it won’t be available and you will have to generate a new one.

Copy the Auth Token generated in the “Access Token” field and save it securely in your system. You can use this token for the request header “x-cleartax-auth-token” later in your API requests.

Please note, you can generate as many tokens as you want (may be for each ERP). To help you identify the tokens in the future, you can name the access tokens with labels. So make sure to keep the labels unique and identifiable.

Keep it safe!

Access token is a confidential information. After creating an access token, it's important to persist it in a secure location.

Last updated