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
| Method | REST API | Remote MCP | When to use |
|---|---|---|---|
| API key (pt_live_…) | Supported | Not supported | Server-to-server REST integrations and scripts |
| OAuth access token | Supported | Required | User-authorized clients, especially MCP clients |
Authorization: Bearer YOUR_TOKENNever 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.
| Item | Current value |
|---|---|
| Issuer | https://auth.promptessor.com |
| Authorization endpoint | https://auth.promptessor.com/authorize |
| Token endpoint | https://auth.promptessor.com/token |
| Dynamic registration | https://auth.promptessor.com/register |
| Revocation endpoint | https://auth.promptessor.com/revoke |
| JWKS | https://auth.promptessor.com/jwks.json |
| REST audience | https://api.promptessor.com |
| MCP audience | https://mcp.promptessor.com |
| Access token lifetime | 10 minutes |
| Authorization code lifetime | 5 minutes |
| Refresh token idle lifetime | 30 days |
| Refresh token maximum lifetime | 90 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
Discover the authorization server
Fetch the authorization-server metadata and use the advertised authorization, token, registration, revocation, and JWKS endpoints.
- 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
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
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
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
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.
| Scope | Allows |
|---|---|
| prompts:generate | Generate complete prompts or reusable prompt templates |
| prompts:presets:read | List, read, and render owned prompt presets |
| prompts:presets:write | Create, update, and delete owned prompt presets |
| prompts:analyze | Analyze prompts |
| prompts:optimize | Optimize prompts |
| prompts:refine | Refine standalone prompts or optimized versions |
| prompts:reverse | Reverse-engineer prompts from supported inputs |
| uploads:write | Create, complete, read, and delete temporary uploads |
| usage:read | Read credits, limits, and token estimates |
| history:read | List and read workflow history |
| history:manage | Rename and delete workflow history |
| library:read | Read accessible Prompt Library items |
| library:write | Create, update, and delete private library items |
| library:interact | Save and vote on public library items |
| library:publish | Publish owned items or make them private |
| operations:read | List and inspect asynchronous operations |
| operations:cancel | Cancel operations that are still pending |
| webhooks:manage | Create, update, test, rotate, and delete webhook endpoints |