Skip to main content

POST Services

GET TOKEN

This service should only be consumed when OAuth is active in the application. It generates a token to consume the other services.

PARAMETERS
PARAMETER TYPEMEDIUMDESCRIPTION
grant_typeStringFormDataType of Authorization
usernameStringFormDataUsername assigned by Ado for the token query.
passwordStringFormDataPassword corresponding to the assigned user for the token query, must be in SHA-1 hash format.

Example consumption:

1
curl -X POST "http://localhost:62859/api/token" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username=username&password=sha1password"

RESPONSES
CodeDescription
200JSON object containing the token and other fields described in the RESPONSE FIELDS table
400unsupported_grant_type
The user name or password is incorrect.

RESPONSE FIELDS:
Field NameTYPEDESCRIPTION
access_tokenStringEl token emitido.
token_typeStringTipo de token generado.
expires_inIntTiempo de vigencia del token en minutos.
issuedStringFecha y hora de emisión de emisión del token.
expiresStringFecha y hora de vencimiento del token.

Example response:

1
2
3
4
5
6
7
{
    "access_token": "laK8SdjrKUAN7ja4SicUS-mL8eNWW74OTU2ZmSzjABLCGUgZknEifQkNtd5F20pBQiWvDpVwda9Bf31hB-mnzJLWmuKYY1sygHT37RQGI3Ym1HkLHwduutHwze2m9ZSBWCSV9NgOjO5Zd0Rcl9eexjFOS7cR6lOIZxxu31rLI_mHMbgtdSMAG-gToiHkgeXw6zbYjVaO1IzKMDjczyLZuvlYOfKNiJeh-3XbfjRxUy0",
    "token_type": "bearer",
    "expires_in": 59,
    ".issued": "Mon, 27 Jul 2020 20:38:24 GMT",
    ".expires": "Mon, 27 Jul 2020 20:39:24 GMT"
}