Authentication

Obtain access token

Exchange client credentials for an access token.

The returned token includes scopes that determine API access:

  • shipper scope grants access to /v1/shipper/** endpoints
  • carrier scope grants access to /v1/carrier/** endpoints
  • Partners with both scopes can access both APIs with a single token

The returned token should be included in subsequent API requests as a Bearer token in the authorization header: authorization: Bearer {access_token}

Tokens are valid for the duration specified in expires_in (seconds). We recommend caching tokens and refreshing them before expiration.

post/v1/auth/token

Request

  • Base URL
    https://api.oway.io
  • URL
    https://api.oway.io/v1/auth/token
  • Auth
    none declared

Request body

clientIdstring required

Client ID provided by Oway

clientSecretstring required

Client secret provided by Oway

Example request

{
  "clientId": "abc123def456",
  "clientSecret": "secret_xyz789"
}

Response

Token successfully generated

accessTokenstring

The access token to use for API requests

tokenTypestring

Token type (always 'Bearer')

expiresIninteger

Token validity in seconds

Example response

{
  "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "tokenType": "Bearer",
  "expiresIn": 86400
}

Changes

No recorded changes to this operation across all 1 revision of this API.