Comick Developers
Comick Developers
Catalog APIMy appsBack to ComickBuild with Comick

Getting started

Register your appApp access

API reference

OAuth referenceSign in with ComickRefresh and disconnectLibrary APIErrors and limitsMihon and tracker integrations

OAuth reference

Authorization parameters, permissions, token exchange, and callback rules.

Discovery

curl 'https://comick.dev/api/auth/.well-known/oauth-authorization-server'

Use the published endpoint URLs. This library flow supports authorization code with S256 PKCE and optional refresh tokens. Dynamic registration and machine grants are unavailable. OIDC login uses a dedicated issuer and separate consent; identity scopes and OIDC credentials cannot be used in this library flow.

Authorization request

Navigate the user's browser to https://comick.dev/api/auth/oauth2/authorize using a query constructed by your URL library.

ParameterValue
response_typecode
client_idYour registered client ID
redirect_uriAn exact registered callback URL
scopelibrary:read, optionally library:write, episodes:create and offline_access
resourcehttps://api.comick.dev/integrations/v1
stateFresh random value bound to the initiating application session
code_challengeBase64url-encoded SHA-256 hash of the verifier, without padding
code_challenge_methodS256

The verifier must be a cryptographically random, 43–128 character string using unreserved URI characters. A random 32-byte value encoded as base64url is suitable. PKCE is required for confidential clients as well as public clients. Plain PKCE is not supported.

Comick presents the registered app name, description, and requested permissions. Users can decline the request or optional offline access. Development apps are labeled and restricted to their owner.

Callback

Successful authorization redirects to your callback with code and state. A denial can return error=access_denied and state. Verify the state against the unexpired, one-time attempt before handling either outcome.

Codes are short-lived and single-use. Exchange immediately; never retry a consumed code. If you lose the exchange response, restart authorization rather than assuming another exchange is safe. An invalid callback may be rejected on Comick without redirecting to your site.

Token request

Send POST https://comick.dev/api/auth/oauth2/token with Content-Type: application/x-www-form-urlencoded.

FieldValue
grant_typeauthorization_code
codeCode from the validated callback
redirect_uriSame callback used in authorization
code_verifierOriginal verifier for this attempt
resourcehttps://api.comick.dev/integrations/v1
client_idRequired in the form for public clients

Confidential clients authenticate with HTTP Basic (client_secret_basic). Public clients use no secret or Basic header. Cross-origin browser requests use credentials: "omit".

An example token response is:

{
  "access_token": "OPAQUE_ACCESS_TOKEN",
  "token_type": "Bearer",
  "expires_in": 900,
  "scope": "library:read offline_access",
  "refresh_token": "OPAQUE_REFRESH_TOKEN"
}

The refresh token is optional. Inspect granted scope rather than assuming the user approved everything. Access tokens last 15 minutes; refresh tokens last 30 days and rotate when used. Token validity can end sooner because of revocation, session expiry, or account eligibility.

The optional episodes:create permission requires the app to enable episode creation and a separate user approval. The account must retain a current uploader role. Existing library permissions never grant it; reconnect with the new scope after enabling it.

Tokens are opaque credentials: do not decode them as JWTs, extract a user ID, or use them for Comick account-management endpoints. See refresh and disconnect and errors.

To display the connected account's public UUID, username and avatar, send the access token to GET https://api.comick.dev/integrations/v1/me. It requires library:read, with no extra identity scope or reauthorization. This resource endpoint does not enable OpenID Connect userinfo or return an ID token.

Mobile quickstart

Connect a native mobile or desktop application through the system browser.

Sign in with Comick

Add profile-only OpenID Connect login to backend, browser, and native apps.

On this page

DiscoveryAuthorization requestCallbackToken request