Skip to content

admin get_access_token.json

Timothy Duffy edited this page Mar 8, 2015 · 1 revision

###admin/get_access_token.json###

This gets an access token that needs to be passed around with all admin api calls.

admin/get_access_token.json

POST fields:

username
    =<username>

password
    =<password>

Response:

{
    "username": "temp_user",
    "first_name": "",
    "last_name": "",
    "fence": {
        "bottom_right_lat": 43,
        "top_left_lng": -77.9,
        "top_left_lat": 43.4,
        "bottom_right_lng": -77.3
    },
    "success": true,
    "token": "5861d170-7de2-4373-b86d-1520c46cea0a",
    "organization": ""
}

Possible error messages include:

Bad credentials:
{
    "success": false,
    "error_text": "Invalid credentials"
}

Missing fields:

{
    "success": false,
    "error_text": "Missing 'username' or 'password' within request"
}
Clone this wiki locally