Skip to main content

Generate Token

The token endpoint is used to generate an API Access Token which can be used later to search using the Ploogins Search Engine, and a Refresh Token.

https://api.ploogins.com/v1/auth/token

Body Params

The parameters passed to the auth/token endpoint need to be passed as formData.

NameTypeDescriptionExample
service_name *stringYour service name, provided by the Ploogins teamPloogins
license_key *stringYour license key, provided by the Ploogins teamD97B07B7-0955-4B2B-A9FD-9C685716DC19

Request Example

In order to call this endpoint, it is necessary to use the POST method with the two required parameters

curl    --location 'api.ploogins.com/v1/auth/token' \
--form 'service_name="Ploogins"' \
--form 'license_key="D97B07B7-0955-4B2B-A9FD-9C685716DC19"'

Response Example

warning

The generated access token will only be valid for 5 minutes. After this time, another token will need to be generated.

The refresh token will be valid for 7 days, or until a new refresh token is requested.

{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzaWQiOjEsInJvbGUiOiJzZXJ2aWNlIiwic2NvcGUiOiJhY2Nlc3MiLCJleHAiOjE3MjA3OTk3MTgsImlhdCI6MTcyMDc5OTQxOH0.Hcl-qci9qGwhMNroVw1ubQimP5xyLMazqnXLmIxVA58gHp_h0vCyadkVc9J2BQOi0bxpEuJqRv8JzY_6Hap-VA",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzaWQiOjEsInJvbGUiOiJzZXJ2aWNlIiwic2NvcGUiOiJyZWZyZXNoIiwiZXhwIjoxNzIxNDA0MjE4LCJpYXQiOjE3MjA3OTk0MTh9.iK_sYNIaoWVk6AIQk55j3oLH7R7Q4Ee8-dRkFfrNwCgniWnYzzzot3CX8H8lmbTdw7mScD58tBxcIRAVpy1ptA"
}