For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LoginStart trialGet a demo
  • Welcome
    • Getting Started
    • Create an API Key
    • Pagination
    • Rate Limiting
    • No-Code Integrations
  • Webhooks
  • OAuth2
      • GETAuthorize
  • API Reference
LogoLogo
LoginStart trialGet a demo
OAuth2Authorizations

Authorize

GET
https://app.beehiiv.com/oauth/authorize
GET
/oauth/authorize
$curl -G https://app.beehiiv.com/oauth/authorize \
> -H "Content-Type: application/json" \
> -d client_id=WDgKDt_bHOXUfWRhGf2ovKZmFHQ9r_Erd01IPmz_boc \
> --data-urlencode redirect_uri=http://localhost:3008/callback \
> -d response_type=code \
> --data-urlencode scope=posts:read \
> -d state=12345678

Starts the OAuth2 authorization code flow. This endpoint redirects the user to login and consent (if needed), then redirects back to your redirect_uri with a code and state.

Was this page helpful?
Previous

Create token

Next
Built with

Query parameters

client_idstringRequired

The OAuth application client ID (uid).

redirect_uristringRequired
Must exactly match one of the app's configured redirect URIs.
response_typestringRequired

Must be code for the authorization code flow.

scopestringOptional

Space-delimited list of requested scopes.

statestringOptional
Opaque value returned to your callback for CSRF protection.
code_challengestringOptional
PKCE code challenge for public clients.
code_challenge_methodenumOptional

PKCE challenge method (plain or S256).

Allowed values:

Response

Redirect

Errors

400
O Auth Bad Request Error
401
O Auth Unauthorized Error