Create authorization code

Create an authorization code for the PKCE flow to generate a user-controlled API key

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Request

This endpoint expects an object.
callback_urlstringRequiredformat: "uri"

The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools.

code_challengestringOptional
PKCE code challenge for enhanced security
code_challenge_methodenumOptional
The method used to generate the code challenge
Allowed values:
expires_atdatetime or nullOptional
Optional expiration time for the API key to be created
key_labelstringOptional<=100 characters
Optional custom label for the API key. Defaults to the app name if not provided.
limitdoubleOptional
Credit limit for the API key to be created
usage_limit_typeenumOptional
Optional credit limit reset interval. When set, the credit limit resets on this interval.
Allowed values:

Response

Successfully created authorization code
dataobject
Auth code data

Errors

400
Bad Request Error
401
Unauthorized Error
409
Conflict Error
500
Internal Server Error