Tokens API

The Tokens API allows authenticated users to create, manage, and revoke API tokens and their authorization scopes programmatically.

Endpoint

POST https://api.udacity.com/api/public/api/v1/tokens/graphql

Authentication

Unlike the other APIs (which use API token auth), the Tokens API primarily uses JWT authentication — meaning users must be logged in through Udacity’s auth system.

The Tokens API is typically used via the Udacity Management Portal (UMP) rather than directly by API consumers. It’s documented here for completeness and for advanced integrations.

Overview

OperationTypeDescription
tokensQueryList your API tokens
createTokenMutationCreate a new API token
revokeTokenMutationRevoke an existing token
addTokenScopeMutationAdd a scope to a token (staff only)
removeTokenScopeMutationRemove a scope from a token (staff only)

Key concepts

Token lifecycle

  1. Create — Generate a new token with a description and optional expiration
  2. Add scopes — Assign authorization scopes that determine what the token can access
  3. Use — Include the token in Authorization: Token <key> headers
  4. Revoke — Invalidate the token when it’s no longer needed

Scopes

Tokens are only useful when they have scopes. Scopes control which APIs and resources a token can access:

Scope TypeFormatGrants access to
COMPANYCOMPANY:<companyId>Company-level resources (Catalog, Program Progress, Assessment Progress, Learning Plan Progress)

Token security

  • The full token value is only returned once at creation time
  • Subsequent queries only return a redacted version
  • Tokens can have an expiration date
  • Revoked tokens are immediately invalidated

Next

  • Queries — Token query reference
  • Mutations — Create, revoke, and manage tokens
  • Types — All types and enums