ALPHA

Use this webservice to request an access token.

<aside> ℹ️ Recommended Flow

Besides this token does not expires it might occur that the token is not valid anymore or your app lose it. In that case, any other call to the app will cause a HTTP 403 error. In this case you app should call this /authorize method again to get a new token and continue performing the original operation.

</aside>

Resource information
Authentication Required
HTTP Method POST
Response JSON
Version 1

Resource URL

<https://www.mapapropapp.com/api/action/oauth2-v1/authorize>

Parameters

Key Type Required Description
client_id string yes The CLIENT ID provided by Mapaprop
client_secret string yes The CLIENT SECRET provided by Mapaprop
grant_type string yes Use the constant text client_credentials

Sample code

POST /api/action/oauth2-v1/authorize HTTP/1.1
Host: www.mapapropapp.com
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.

Object Field Type Required Description
Response accessToken string yes The access token needed for verification
tokenType string yes Always bearer

Sample code

{
    "accessToken": "7147c222b5989488fd14d28d20e099b0",
    "tokenType": "bearer"
}

Manual Method

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