jsonpad
No results
Search failed
No results
Narrow your search with type:list, type:token, #tag…↑↓ to move · Enter to open · Esc to close
  • Home
    • Getting started
      • Create a list
      • Add some items
      • Fetch all items
      • Fetch an item
      • Update an item
    • Talking to the API
      • cURL
      • JS/TS
      • HTTP methods
      • Rate limits
      • Caching
    • List schemas
    • Indexing lists
      • Creating an index
      • Index builds
      • Alias indexes
      • Sorting lists
      • Filtering items
      • Searching lists
      • Guard indexes
    • Paths and pointers
      • Fetch partial data
      • Update partial data
      • Delete partial data
    • Token permissions
    • Tags
      • Adding tags
      • Filtering by tag
      • Tags in the dashboard
    • Schema sync
      • The document
      • Syncing
      • Scopes
      • Exporting existing lists
      • The command line tool
    • Command line tool
      • Installing
      • Authentication and profiles
      • Output formats
      • Exporting and importing items
      • Using it in CI
      • Command reference
    • Authentication
    • Identity groups
    • Password reset
      • Token delivery
      • Receiving webhooks
      • Email verification
    • Signing in with a provider
      • In your app
      • Callback modes
      • Linking accounts
      • Sign in with Google
      • Sign in with GitHub
      • Sign in with Apple
      • Sign in with Microsoft
      • Sign in with Discord
      • Sign in with Facebook
    • Realtime updates
    • Event log
    • Version control
    • Using the SDKs
      • Server
      • Browser
    • Variables
    • JSON5
    • MessagePack
  • API reference
    • Lists
      • Create a list
      • Fetch all lists
      • View a list
      • Search a list
      • Fetch list stats
      • Fetch list events
      • View a list event
      • Update a list
      • Delete a list
    • Items
      • Create an item
      • Fetch all items
      • Fetch all item data
      • Fetch partial item data
      • View an item
      • View item data
      • View partial item data
      • Fetch item stats
      • Fetch item events
      • View an item event
      • Restore an item
      • Update an item
      • Update item data
      • Replace item data
      • Patch item data
      • Update partial item data
      • Replace partial item data
      • Patch partial item data
      • Delete an item
      • Delete partial item data
    • Indexes
      • Create an index
      • Fetch all indexes
      • View an index
      • Fetch index stats
      • Fetch index events
      • View an index event
      • Update an index
      • Rebuild an index
      • Delete an index
    • Identities
      • Create an identity
      • Fetch all identities
      • View an identity
      • Fetch identity stats
      • Fetch identity events
      • View an identity event
      • Update an identity
      • Delete an identity
      • Register an identity
      • Login an identity
      • Logout an identity
      • Fetch the current identity
      • Update the current identity
      • Delete the current identity
      • List sign-in providers
      • Start signing in with a provider
      • Finish signing in with a provider
      • List the current identity's linked accounts
      • Link a provider account
      • Unlink a provider account
      • Request a password reset token
      • Reset a password
      • Request an email verification token
      • Verify an email address
    • Fetch the current token
    • Schema sync
      • Sync a schema
      • Export a schema
      • Move lists between scopes
    • Limits and quotas
      • What counts as a request
      • Response headers
      • What happens when you run out
      • When the allowance resets
      • Storage
      • Rate limits
      • Version history
      • What is not limited
    • Errors
      • Error object
      • Error codes

Link a provider account

Start linking a provider account to the current identity, so it can sign in with that account as well as the way it does now. This works like starting a sign-in: send the person to the URL in the response, then finish it on the return page.

The API token needs the update-self permission for the identity's group. If another identity is already linked to that account, finishing it fails with IDENTITY_PROVIDER_ALREADY_LINKED (20021).

POST https://api.jsonpad.io/identities/self/providers/:provider/start

Example

cURL
123456789curl https://api.jsonpad.io/identities/self/providers/google/start \ -H "Content-Type: application/json" \ -H "x-api-token: <YOUR TOKEN>" \ -H "x-identity-group: players" \ -H "x-identity-token: <IDENTITY TOKEN>" \ -d '{ "redirectUrl": "https://myapp.com/settings/accounts", "clientVerifierHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }'

Parameters

  • required
    providerstringgoogle, github, apple, microsoft, discord or facebook, and enabled for the identity's group.

Request headers

  • required
    x-api-tokenstringYour API token.
  • required
    x-identity-tokenstringAn identity token.
  • required
    x-identity-groupstringAn identity group.

Request body

{
redirectUrl: "https://myapp.com/settings/accounts"
clientVerifierHash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
  • required
    redirectUrlstringThe page the person comes back to, which must be one of the identity group's redirect URLs.
  • required
    clientVerifierHashstring64 hexadecimal characters: the SHA-256 hash of the verifier your app keeps for the return page.

Response body

200 OK

Send the browser to url. The link has to be finished before expiresAt, 10 minutes later.

{
url: "https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=...&state=kP1s2JNS2v5HcwH..."
expiresAt: "2026-09-18T20:42:07.439Z"
}

Response headers

No response headers

2026-09-17
fl3x