Freepark Authentication and Authorization

Resource URL

https://auth.freepark.co/token

Parameters

ParameterDescriptionOptionalDefault
grant_type client_credentials False False

Example

POST https://auth.freepark.co/token

Request

PHP Example
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://auth.freepark.co/token");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:  application/x-www-form-urlencoded' ,"Authorization: Basic ".base64_encode(CLIENT_ID:CLIENT_SECRET)));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"grant_type=client_credentials");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
echo $response;

Response

{
    "access_token": "1858cb26d54675e7e60d922d47f807d07d7a2aa3",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": null,
    "refresh_token": "db5bd5e5b593942396a04b1f20edd0b63a133adf"
}

Error Response

{
    "error": "invalid_client",
    "error_description": "The client credentials are invalid"
}

Resource Information

Rate Limited False
Response Format JSON
Authentication 1