Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Partners can call editor URL with their Tokens passing it to the query parameter instead of passing apiKey directly .

The tokens can be generated via the below APIs.

First, you need to generate token, In the body, you can pass multiple param and value which you were passing as a query parameter

Generate token endpoint

POST :

tokens.dev.graebert.com/generate


Header :

Content-type:application/json, x-api-key: api-key1

Body :

{
  "auth" : "apiKey",
  "file" : "filePath",
  "userId" : "userId",
  "server": "serverId",
  "param": "value"
}

Result :

On successful, it will give 200 status code

status: 200 Ok
{
    "token": "bbf18f21-3d0d-4a4c-b650-9c14d4075ce0",
    "expiration_time": 1595917409
}

On error, it will give 403 error code like below

status: 403 Forbidden
{
    Wrong token
}

Validate token and get all param and valued stored for that token

To validate the token, we have another endpoint API, in which you have to pass token on header. on success , it will return all param and values stored for that token

GET:

https://tokens.dev.graebert.com/verify

Header :

Content-type:application/json, x-api-token: apiToken

Result :

Status: 200 OK
{
  "auth" : "apiKey",
  "file" : "filePath",
  "userId" : "userId",
  "server": "serverId",
  "param": "value"
}

On error, it will give 403 error code like below

status: 403 Forbidden
{
    Wrong token
}



  • No labels