Platform fundamentals

Authentication and scopes

Use REST API keys or OAuth safely, and grant only the permissions an integration needs.

Verified against the implementation ·

Authentication methods

MethodREST APIRemote MCPWhen to use
API key (pt_live_…)SupportedNot supportedServer-to-server REST integrations and scripts
OAuth access tokenSupportedRequiredUser-authorized clients, especially MCP clients
Authorization: Bearer YOUR_TOKEN

Never expose credentials

Do not place API keys in browser code, mobile binaries, source control, URLs, screenshots, support tickets, or client-visible logs. Revoke and replace a key immediately if it is exposed.

API key lifecycle

  • Keys are stored by PrompTessor as SHA-256 hashes; the full secret is shown once.
  • A key may be named, scoped, given an expiration date, edited, revoked, or permanently removed.
  • Legacy pt_test_ keys remain accepted until rotated or revoked, but newly created credentials use pt_live_.
  • API key limits are plan-based: Pro 3, Pro+ 5, and Max 10 active keys. Equivalent lifetime plans use the same tier limits.

OAuth discovery and token lifecycle

PrompTessor supports the authorization-code flow with PKCE S256, public clients with token endpoint authentication method none, refresh tokens, revocation, protected-resource metadata, authorization-server metadata, JWKS, and dynamic client registration.

ItemCurrent value
Issuerhttps://auth.promptessor.com
Authorization endpointhttps://auth.promptessor.com/authorize
Token endpointhttps://auth.promptessor.com/token
Dynamic registrationhttps://auth.promptessor.com/register
Revocation endpointhttps://auth.promptessor.com/revoke
JWKShttps://auth.promptessor.com/jwks.json
REST audiencehttps://api.promptessor.com
MCP audiencehttps://mcp.promptessor.com
Access token lifetime10 minutes
Authorization code lifetime5 minutes
Refresh token idle lifetime30 days
Refresh token maximum lifetime90 days

Let the client discover OAuth

For supported MCP clients, enter only the MCP URL first. The client should follow the 401 WWW-Authenticate challenge and protected-resource metadata instead of requiring users to copy tokens manually.

OAuth for REST integrations

Use OAuth when your product needs each PrompTessor user to authorize access to their own account. Server-owned automations that access only one account should normally use a scoped API key instead.

  1. 1

    Discover the authorization server

    Fetch the authorization-server metadata and use the advertised authorization, token, registration, revocation, and JWKS endpoints.

  2. 2

    Register a public client

    Register one to twenty exact redirect URIs. PrompTessor supports public clients only, so token_endpoint_auth_method must be none and no client secret is issued.

  3. 3

    Create PKCE values

    Generate a 43–128 character code_verifier and its base64url SHA-256 code_challenge. Store a separate unpredictable state value in the user session.

  4. 4

    Request authorization

    Open /authorize with response_type=code, client_id, redirect_uri, code_challenge, code_challenge_method=S256, scope, state, and resource=https://api.promptessor.com.

  5. 5

    Exchange the code

    POST application/x-www-form-urlencoded data to /token with grant_type=authorization_code, the returned code, client_id, the same redirect_uri, and the original code_verifier.

  6. 6

    Refresh or revoke

    Rotate refresh tokens through /token with grant_type=refresh_token. When disconnecting, POST the token and client_id to /revoke and delete locally stored credentials.

curl -X POST https://auth.promptessor.com/register \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "Example integration",
    "redirect_uris": ["https://example.com/oauth/promptessor/callback"],
    "grant_types": ["authorization_code", "refresh_token"],
    "response_types": ["code"],
    "token_endpoint_auth_method": "none",
    "scope": "usage:read history:read"
  }'

Refresh tokens rotate

Replace the stored refresh token after every successful refresh. Reusing a consumed refresh token revokes its complete token family.

Scope reference

Default and explicit scopes

If an API-key creation or OAuth request omits scopes, PrompTessor grants all current public scopes. An explicit scope list remains least-privilege. Existing keys and OAuth grants are not expanded automatically when new defaults are introduced; update the key or disconnect and reconnect the OAuth client.

ScopeAllows
prompts:generateGenerate complete prompts or reusable prompt templates
prompts:presets:readList, read, and render owned prompt presets
prompts:presets:writeCreate, update, and delete owned prompt presets
prompts:analyzeAnalyze prompts
prompts:optimizeOptimize prompts
prompts:refineRefine standalone prompts or optimized versions
prompts:reverseReverse-engineer prompts from supported inputs
uploads:writeCreate, complete, read, and delete temporary uploads
usage:readRead credits, limits, and token estimates
history:readList and read workflow history
history:manageRename and delete workflow history
library:readRead accessible Prompt Library items
library:writeCreate, update, and delete private library items
library:interactSave and vote on public library items
library:publishPublish owned items or make them private
operations:readList and inspect asynchronous operations
operations:cancelCancel operations that are still pending
webhooks:manageCreate, update, test, rotate, and delete webhook endpoints