Let other QPosty users authorize your product.

OAuth apps

Use OAuth when your product schedules posts for other QPosty users. Do not ask them for their API key.

1. Register the app

Settings → Developers → Apps → create app with redirect URL.

Credentials:

  • Client ID: pca_…
  • Client Secret: pcs_… (once)

2. Redirect users to authorize

https://app.qposty.com/oauth/authorize?client_id=pca_YOUR_ID&response_type=code&state=RANDOM
ParamRequiredNotes
client_idYesYour pca_ id
response_typeYesMust be code
stateRecommendedCSRF protection

Consent screen shows your name, description, and picture.

3. Handle the callback

Success:

https://yourapp.com/callback?code=…&state=…

Denied:

https://yourapp.com/callback?error=access_denied&state=…

Codes expire in 10 minutes and are single-use.

4. Exchange the code

curl -X POST https://api.qposty.com/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "authorization_code",
    "code": "…",
    "client_id": "pca_…",
    "client_secret": "pcs_…"
  }'
{
  "id": "org_id",
  "cus": null,
  "access_token": "pos_…",
  "token_type": "bearer"
}

5. Call the Public API

Use access_token exactly like an API key on /public/v1/*.

Managing the app

ActionEffect
Rotate secretOld pcs_ fails on new exchanges; existing pos_ tokens keep working
Delete appAll pos_ tokens revoked; removed from users' Approved apps
User RevokeThat org's tokens for your app stop working

Errors

ErrorWhen
invalid_clientBad client id/secret
invalid_grantCode invalid, expired, or reused
unsupported_grant_typegrant_typeauthorization_code
access_deniedUser clicked Deny