Skip to content
Last updated

Client ID & Secret

If someone has already given you a client ID and client secret, you don't need to sign in to the Developer Portal to use them. Use them directly to get a token, then use that token on every API call.

  1. Get your client ID and client secret from whoever created the service account for you. Store the secret somewhere safe, you won't be able to see it again later.
  2. Call the token endpoint with both values:
curl --location 'https://api.lytx.com/api/serviceaccount/token' \
  --header 'Content-Type: application/json' \
  --data '{
    "clientId": "<your_client_id>",
    "clientSecret": "<your_secret>"
  }'
  1. The response gives you a short-lived token (a JWT). Use this token as a Bearer token on every API call you make.
  2. When the token expires, call the same endpoint again to get a new one. Don't try to reuse an old, expired token.

This page doesn't require signing in. If you need to create your own service account instead of using one someone gave you, see Self-Serve Client Credentials.