Get an access token

POST https://api.imageintelligence.com/v2/oauth/token

This endpoint allows you to generate an accessToken which in turn will allow you to authenticate with our API. Before you can generate an accessToken, you'll first need to obtain the clientId and clientSecret. Begin by following these steps:

  1. Create an account using our Developer Portal, then log in
  2. Create a new application. This will issue your client credentials in the form of a clientId and clientSecret. Client credentials can be provisioned and revoked under the Applications page. It is recommended to create different applications if you are using the API in different environments or contexts.
  3. Get an access token by including your client credentials in a request to /oauth/token
curl -X POST \
  https://api.imageintelligence.com/v2/oauth/token \
  -d '{
    "clientId": $CLIENT_ID,
    "clientSecret": $CLIENT_SECRET"
  }'
  1. Access the API by including the token in the authorization header of each request like so:
curl -X $HTTP_METHOD -H "Authorization: Bearer $TOKEN" "https://api.imageintelligence.com/v2/$PATH"

Request Parameters

NameInDescription
clientId
required
bodystring

Your application's clientId

clientSecret
required
bodystring

Your application's clientSecret

Request Sample

{
  "clientId": "69VYLJO2W9S53ARW45QYPABCX",
  "clientSecret": "ABCSErTf78aRDPABC/r41AOIW2MlMoZR3lGgMABCDg"
}

Response Parameters

Access token with organization name, time of issue, and time of expiry

accessToken
required
string

A generated access token used to authenticate with the API

expiresAt
required
number

The UNIX timestamp for when this access token expires

Format: int64

issuedAt
required
number

The UNIX timestamp for when this access token was generated

Format: int64

orgName
required
string

Name of the organization this token belongs to

appName
required
string

Name of the application this access token was generated from

scope
required
string

A list of space delimited scopes

Response Sample

{
  "accessToken": "eyJzdHQiOiJhY2....xUC3RJFY1T8",
  "expiresAt": 1489105452385,
  "issuedAt": 1489019052385,
  "orgName": "acme",
  "appName": "acme-app",
  "scope": "recognition:read recognition:create recognition:update recognition:remove ask:read ask:create match:read match:create feedback:create feedback:read detect:create detect:read find-target:create find-target:read find-object:create find-object:read"
}