Field NationDeveloper Platform
Field NationDeveloper Platform
IntroductionQuick StartAPI Playground

Getting Started

AuthenticationAPI BasicsTroubleshooting

API Reference

Getting Started

Authentication

Securely authenticate with the Field Nation API using OAuth 2.0.


Authentication

The Field Nation API uses OAuth 2.0 for authentication. You must exchange your credentials for an access token, which is then included in the header of every API request.

OAuth Flow

Get Credentials

Obtain your client_id, client_secret, username, and password from your Field Nation representative or integration settings.

Request Access Token

Make a POST request to the token endpoint to exchange your credentials for a bearer token.

curl -X POST "https://api.fieldnation.com/authentication/api/oauth/token" \
     -H "Content-Type: application/json" \
     -d '{
           "grant_type": "password",
           "client_id": "YOUR_CLIENT_ID",
           "client_secret": "YOUR_CLIENT_SECRET",
           "username": "YOUR_USERNAME",
           "password": "YOUR_PASSWORD"
         }'
{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbG...",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "basic",
  "refresh_token": "cf83e1357eefb8bdf1542850d66d8007"
}

Use the Token

Include the access_token in the Authorization header of your API requests.

curl -X GET "https://api.fieldnation.com/api/rest/v2/workorders/12345" \
     -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG..."

Token Expiration: Access tokens are valid for a limited time (usually 1 hour). When a token expires, use the refresh_token or re-authenticate to get a new one.

Errors

Common authentication errors you might encounter:

Status CodeMessageDescription
401UnauthorizedThe token is missing, invalid, or expired.
403ForbiddenThe token is valid, but the user does not have permission for this resource.

Last updated on

API Playground

Jump to the REST API v2 playground to explore requests and responses.

API Basics

Fundamental concepts, standards, and conventions used across the Field Nation API.

On this page

Authentication
OAuth Flow
Get Credentials
Request Access Token
Use the Token
Errors