Open API v1

Quickstart

To call APIs for your own account, start with a personal API key. To build an app for other users, follow the merchant OAuth flow below.

App integration

Use a personal API key

Sign in to your personal console and create an API key with profile.read permission. Use it below to read your account details. Copy the key when it appears; it is shown only once.

See how to get started
GET https://api.harperharbor.com/open/v1/me
Authorization: Bearer <personal API key>
language: en

Merchant integration · OAuth

  1. 1 · Register your client

    Register once per origin. Redirect URIs must be https (localhost is allowed in development) and must not contain a fragment. Persist the returned client_id.

    POST https://api.harperharbor.com/oauth/register
    Content-Type: application/json
    
    {
      "client_name": "Your app",
      "redirect_uris": ["https://app.example.com/oauth/callback"],
      "grant_types": ["authorization_code", "refresh_token"]
    }
    
    → 201 { "client_id": "…" }
  2. 2 · Ask the user to authorize

    Authorization code with PKCE (S256). Include the resource indicator so the token is bound to the Open API audience.

    https://api.harperharbor.com/oauth/authorize
      ?response_type=code
      &client_id=…
      &redirect_uri=https://app.example.com/oauth/callback
      &resource=https://api.harperharbor.com/open/v1
      &state=…
      &code_challenge=…            # base64url(sha256(verifier))
      &code_challenge_method=S256
  3. 3 · Exchange the code

    Post the code and verifier to the token endpoint. You receive an access token and a refresh token.

    POST https://api.harperharbor.com/oauth/token
    Content-Type: application/x-www-form-urlencoded
    
    grant_type=authorization_code&code=…&client_id=…
    &redirect_uri=…&code_verifier=…&resource=https://api.harperharbor.com/open/v1
    
    → 200 { "access_token": "…", "refresh_token": "…", "expires_in": 3600 }
  4. 4 · Make the first call

    Use a Bearer token in the Authorization header and include the language header. Responses use public numeric user IDs, without internal account identifiers.

    GET https://api.harperharbor.com/open/v1/me
    Authorization: Bearer <access token>
    language: en
    
    → 200 { "id": 100001, "nickname": "Aoi" }

Request headers

AuthorizationBearer <access token>
languagezh-Hant · zh-Hans · en · ja · ko
fromweb (optional)

Errors

Errors include a code, message and retry status. For a personal API key, a 401 means you should check whether the key expired or was revoked. For OAuth, try refreshing the token, then request user consent again if needed.

{ "error": "unauthorized | forbidden | not_found | internal",
  "message": "…",
  "retryable": true }

Quotas

Each app has a daily credits quota to limit usage. There is no extra charge for the quota. View usage by app, service and lane in the developer console.

Read the API specification →