Get API Token

How to get an API token in AYAN PDF?

In order to use AYAN PDF apis, users need to have two key attributes to use apis for different type of actions on documents. The key attributes are:

  1. API Key – a unique alphanumeric key assigned to every customer. This is fixed key and cannot be changed or modified.
  2. API token – an alphanumeric token assigned to every customer which can re-generated as when required.

User can get the API token using two ways:

  1. Login into AYAN PDF Account: User can navigate to “AYAN PDF” home page and can click on “Login” button (on top right corner) to login in to their AYAN PDF account. Once the user is successfully logged in, it will redirect user on to dashboard page of AYAN PDF account where they can get the API token for a customer.
  2. Using AYAN Generate Token API: User can use the generate token api of AYAN PDF to generate a new token. Once the HTTP request is made with all the required information, it will generate a new token and will share the API Token in the callout response


Parameter Value Description
Endpoint URL The API endpoint url on which request will be sent
Method POST Set the Callout method as POST
Content-Type application/json Set “application/json” as content type for this request
Request Body (JSON)


   “key”: “<<API Key>>”


All the information in the JSON Body is mandatory. Each attribute represents as below:

  • key – the api key assigned to every customer (Required)
Response with Code =1 {
“message”: “ok”,
“data”: {
“token”: “<<API token generated>>”
“code”: 1
  • If the response “code” is 1, then it represents your request is successfully and an “API Token” is generated.
Response with code=0 {
“message”: “error”,
“data”: {
“message”: “Invalid Key details”
“code”: 0
  • If the response “code” is 0 with message=”error”, then it represents your request is failed due to below reason:
    • “Invalid Key details” – it defines that the key information provided by the customer is wrong. Kindly try with the correct api code.


An API Token is must to use any API on AYAN PDF. If you are facing any issues in generating API token or finding an api key, you can reach us at

This tool is available on Appexchange and Click on below button to install the
latest version of BOFC

or learn more

Leave a Reply

Your email address will not be published. Required fields are marked *

Think you know Salesforce?
Fill in the details to Get Started

Which of the following statements are true about resetting passwords when users get locked out of a Salesforce org that does NOT have single sign-on enabled through an identity service other than Salesforce?

A Salesforce Administrator has 7 million records that need to be loaded into Salesforce and wants to do it in one batch. How can the records be uploaded in one batch?

If a user is working in Salesforce when the login hours end, what will happen?

Which of the following can a Case Queue be used for?

What is true about dynamic dashboards?

Your score is


This will close in 0 seconds