API Authentication#

The GekkoVet API uses OAuth 2.0 to authenticate requests. You will need to provide an access token in the Authorization header of your requests.

The following grant types are supported:

  • Client Credentials

Authentication flow#

In order to start using the API, you will need to contact us to obtain your CLIENT_ID/CLIENT_SECRET credential keypair. Using these credentials, you can then obtain an access token by making a POST request to the token endpoint (https://authentication.gekkovet.com/oauth2/token).

The following parameters are required in the token request:

  • grant_type: client_credentials
  • scope: scopes for the authentication token separated by a +-sign.

The token request must be made using the application/x-www-form-urlencoded content type and authorized using Basic Authentication with your CLIENT_ID/CLIENT_SECRET keypair.

The available scopes for your credentials depend on your contract with GekkoVet. Currently the following scopes are available:

  • gekkovet/read: Read access to the GekkoVet API.
  • gekkovet/tools: Access to the GekkoVet tools API endpoints.
  • gekkovet/premium: Access to the GekkoVet premium API endpoints.

Example#

The following example shows how to obtain an access token using the curl command line tool:

curl -X POST https://authentication.gekkovet.com/oauth2/token \
-H "Authorization: Basic $(
  echo -n "CLIENT_ID:CLIENT_SECRET" | base64
)" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&scope=gekkovet/read+gekkovet/tools"