PROD

Use this webservice to request an access token.

Token expiration and recommended flow

Access tokens expire every 14 days by default (the duration can vary per client — check expires_in in the response). When a token expires or your app loses it, any call will return a HTTP 403 error. In that case your app should call this /authorize method again to get a new token and continue performing the original operation. You can also generate a token manually at https://mapaprop.github.io.

Resource URL

https://mapaprop.app/api/action/oauth2-v1/authorize

Parameters

KeyTypeRequiredDescription
client_idstringyesThe CLIENT ID provided by Mapaprop
client_secretstringyesThe CLIENT SECRET provided by Mapaprop
grant_typestringyesUse the constant text client_credentials

Sample code

POST /api/action/oauth2-v1/authorize HTTP/1.1
Host: mapaprop.app
Content-Type: application/x-www-form-urlencoded
Content-Length: 0

client_id=jfioejweu8wu9fjsHUGldfja9ofwjf&client_secret=UHY&T&FOIHuihd8w2hg3kh8Y&grant_type=client_credentials

Response

You have to parse the JSON response in order to obtain your access token.

ObjectFieldTypeRequiredDescription
ResponseaccessTokenstringyesThe access token needed for verification
access_tokenstringyesSame value as accessToken (snake_case alias)
tokenTypestringyesAlways Bearer
expires_inintyesSeconds until the token expires (default 1209600 = 14 days; may vary per client)

Sample code

{
    "accessToken": "7147c222b5989488fd14d28d20e099b0",
    "access_token": "7147c222b5989488fd14d28d20e099b0",
    "tokenType": "Bearer",
    "expires_in": 1209600
}

Manual Method

To generate the token manually use our app http://mapaprop.github.io