Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 parameterTo protect the confidentiality of api tokens and other parameters such as back-end servers, i.e. instead of passing all parameters individually (Editor URL parameters ), partners can generate a session token for their selected parameters and call the editor with the session token. Usage of the token service will become mandatory eventually and is recommended for all partners.

Generate token endpoint

POST :

Code Block
https://tokens.kudo.graebert.com/generate


Header :

here Pass your api-key x-api-key will be key to specific customer

Code Block
Content-type:application/json, x-api-key: api-key

Body :
Contains all URL parameters (Editor URL parameters ) as JSON body

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

Result :

On If successful, it the service will give return a 200 status code with the token and expiration time.

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

On error, it the service will give return a 403 error code like belowwith a descriptive error message.

Code Block
status: 403 Forbidden
{
    Wrong token
}

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

...

Token validation

You can optionally validate a token with the verification end point

GET:

Code Block
https://tokens.kudo.graebert.com/verify

Header :

Pass the generated token with x-api-token header

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

Result :

If successful, the service will return a 200 status code with the selected url parameters.

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

On error, it the service will give return a 403 error code like belowwith a descriptive error message.

Code Block
status: 403 Forbidden
{
    Wrong token
}

...