NOTHINGPHISHY
NOTHINGPHISHY / GETTING STARTED

Authentication

The Partner API supports two ways to obtain an access token. Both tokens can be used with the same Partner API endpoints.

Client ID and client secret

Use partner-level credentials with the OAuth client credentials flow.

EnvironmentToken URL
Productionhttps://auth.nothingphishy.com/oauth2/token
Developmenthttps://auth-dev.nothingphishy.com/oauth2/token
curl -X POST "$AUTH_URL" \
  -d 'grant_type=client_credentials' \
  -d "client_id=$OPTIMUS_CLIENT_ID" \
  -d "client_secret=$OPTIMUS_CLIENT_SECRET"

User API key

A Partner Admin with API access can generate an API key in Account Settings → API Access. Exchange the key for a token:

curl -X POST "$API_BASE_URL/public/partner-token" \
  -H 'Content-Type: application/json' \
  -d "{\"apiKey\":\"$OPTIMUS_API_KEY\"}"

Alternatively, pass the key in the x-api-key request header.

Note: If the user who created the API key is deleted, all API keys created by that user are automatically revoked and can no longer be used to obtain an access token.

{
  "access_token": "YOUR_ACCESS_TOKEN",
  "token_type": "Bearer",
  "expires_in": 3600
}

Call the API

Use the returned access token in the Authorization header, as shown in the endpoint examples. The token response provides its lifetime in expires_in; request a new token when it expires. Keep client secrets and API keys in a secure server-side environment.

NOTHINGPHISHY / API GUIDE