Freepark Create User

Resource URL

https://auth.freepark.co/create/user

Parameters

ParameterDescriptionOptionalDefault
grant_type password False False
username (Type is string) For example: x@x.com False False
password (Type is string) False False
first_name (Type is string) False False
last_name (Type is string) False False
gender (Type is Enum) m or f True m
birthday (Type is Datetime) yyyy-mm-dd True False
location (Type is string) True False
profile_photo_url (Type is string) url True False

Example

POST https://auth.freepark.co/create/user

Request

PHP Example
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://auth.freepark.co/create/user");
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=password&
        username=x@x.com&
        password=123456&
        first_name=X&
        last_name=X&
        gender=m&
        birthday=xxxx-xx-xx&
        location=xxx,xxx&
        profile_photo_url=http://xxxx.com"
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
echo $response;

Response

{
    "access_token": "a5d4dbd3acc6b10133159d1d635968ac96b17c89",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": null,
    "refresh_token": "5c8f99dd523d5a18eae25002d7cc025c0b862663"
}

Error Response

{
    "error": "invalid_request",
    "error_description": "Missing parameters: "username" , "password", "first_name", "last_name" required"
}

Resource Information

Rate Limited False
Response Format JSON
Authentication 1