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:
- API Key – a unique alphanumeric key assigned to every customer. This is fixed key and cannot be changed or modified.
- 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:
- 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.
- 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 | https://sf.filezipo.io:3003/api/getToken | 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:
|
Response with Code =1 | { “message”: “ok”, “data”: { “token”: “<<API token generated>>” }, “code”: 1 } |
|
Response with code=0 | { “message”: “error”, “data”: { “message”: “Invalid Key details” }, “code”: 0 } |
|
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 support@ayansoftwares.com.