Request OAuth Token

Returns a 3600 second (one hour) access_token.

Note: Refresh tokens are not supported.

Path Parameters

Not applicable.

Query Parameters

Not applicable.

Body Parameters

The oauth endpoint uses form-data key/value pairs instead of a JSON body request.

Parameter Type Example Mapping/Notes
grant_type string password Must be set to password. Refer to OAuth 2.0 Password Grant for more information.
client_id string fn00000-client1 Your unique client id obtained from Field Nation.
client_secret string abc123defg567hijk5678eca123 Your unique client secret obtained from Field Nation.
username string api.user The Field Nation username associated with the API User.
password string api.password The Field Nation username associated with the API User.

Response

The oauth endpoint returns a Bearer token that expires_in 3600 seconds (one hour). Refer to OAuth 2.0 Bearer Token Usage for more information.

Note: This endpoint also returns a user object which includes types_of_work. Do not use this to store a list of Work Types. Refer to Get Types of Work instead.


{
    "access_token": "abc123defg459hijk786lmn45",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "viewprofile",
    "refresh_token": "abc123defg459hijk786lmn45",
    "user": {}
}

Example

You’ll need to use this access_token in the query parameters for every API request.
https://URL?access_token=abc123defg459hijk786lmn45

Errors

400 Bad Request
401 Unauthorized
400 Bad Request