Skip to main content

Didit API Key vs JWT Access Token: Host Map 2026

The API key goes in the x-api-key header on every call to verification.didit.me/v3. The JWT access token goes as Authorization: Bearer only to apx.didit.me/auth/v2 for account management.

Didit API Key vs JWT Access Token: Host Map 2026

Contents

In this guide

Jump to the part you need.

This guide fits developers wiring Didit's API or debugging a 401. Two credentials, two hosts, and mixing them causes authentication errors. Send the api_key in the x-api-key header to https://verification.didit.me/v3/... for sessions and checks. Send the JWT access_token as Authorization: Bearer to https://apx.didit.me/auth/v2 for account management. Sandbox keys are free; a live full ID check is $0.33. The caveat: a missing, invalid, expired or unscoped credential returns 401 or 403.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Didit credential host map, checked November 26, 2026
CredentialHeaderHostWhat it covers
api_key, starting sk_live_ or sk_test_x-api-keyhttps://verification.didit.meSessions, workflows, entities, transactions, standalone APIs, lists, webhooks, billing, every /v3/... route
access_token, an RS256 JWT with a 24-hour defaultAuthorization: Bearerhttps://apx.didit.meAccounts, organizations and applications, every /auth/v2/... route

Start free in the sandbox at business.didit.me, no sales call. For developers, connect Didit to an AI assistant through didit.me/developers/mcp. Module prices live on didit.me/pricing, and the product pages cover identity verification and AML screening.

The two hosts, in one paragraph each

https://verification.didit.me is the verification API. Sessions, workflows, entities, transactions, standalone APIs, lists, webhooks and billing all live here under /v3/..., and all of them authenticate with x-api-key. This host does not accept OAuth Bearer tokens. Treat the key as a server-side secret and never ship it to a browser or a mobile bundle.

https://apx.didit.me is the Auth API for account, organization and application management. It uses Authorization: Bearer <JWT access_token>, returns tokens from POST /auth/v2/programmatic/login/ with a 24-hour default lifetime, and is the host you call to register, log in, list organizations and read an application record. The JWT is not what you send to the verification host.

Three more identifiers people confuse with the key

  • client_id is shown next to api_key in the application record. It exists for OAuth-style introspection scenarios. Routine verification calls need only api_key, so never send client_id as an authentication header.
  • application.uuid is the application id. You need it as a path parameter when you read or manage an application, not as an authentication header.
  • An MCP token is a Log in with Didit grant. It reaches application records only when it carries the didit:management scope. A grant limited to didit:verification is refused with 403 and no credential is returned.

Prerequisites before the first call

What you need before authenticating against the Didit API
ItemRequirementWhere
PlanAny plan. The sandbox is free on every plan. The Free plan gives $10 of monthly credit to eligible organizations that sign up with a work email, phone codes excludedDidit pricing
ApplicationAn application inside your organization. Programmatic signup auto-provisions one live and one sandbox applicationDidit Business Console or POST /auth/v2/programmatic/verify-email/
KeyThe Primary key, or a scoped key created for a service or partnerDevelopers, then API keys
EmailA real deliverable inbox. Reserved test domains return 400 with email_undeliverableThe address you register with
MCP permissiondidit:management scope if an AI client reads application recordsMCP connection setup

Seven steps from zero to a working call

  1. Register on the Auth API. This endpoint takes no credential: email plus password is the credential. It emails a 6-character code with a 10-minute TTL.
    curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \
      -H "Content-Type: application/json" \
      -d '{"email": "you@yourdomain.com", "password": "StrongP@ss1"}'
  2. Verify the code. The response contains access_token, refresh_token, the organization, the live application with its api_key, and the sandbox_application with its own api_key.
    curl -X POST https://apx.didit.me/auth/v2/programmatic/verify-email/ \
      -H "Content-Type: application/json" \
      -d '{"email": "you@yourdomain.com", "code": "A3K9F2"}'
  3. Store both keys. Persist sandbox_application.api_key as DIDIT_API_KEY and application.api_key as DIDIT_LIVE_API_KEY. New keys start with sk_test_ for sandbox and sk_live_ for live, followed by 43 URL-safe characters. Older keys have no prefix and still work, so never validate a key by its prefix.
  4. Call the verification host with the sandbox key.
    curl -X POST https://verification.didit.me/v3/session/ \
      -H "x-api-key: $DIDIT_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"workflow_id":"<WORKFLOW_ID>","vendor_data":"user-42","callback":"https://myapp.com/return"}'
  5. Call the Auth API only when you need account data, and send the JWT there.
    TOK=$(curl -s -X POST https://apx.didit.me/auth/v2/programmatic/login/ \
      -H "Content-Type: application/json" \
      -d '{"email":"you@yourdomain.com","password":"StrongP@ss1"}' | jq -r .access_token)
    
    curl https://apx.didit.me/auth/v2/organizations/me/ -H "Authorization: Bearer $TOK"
  6. Recover a lost api_key. Log in from any machine, list organizations, then read the application record. It returns the current api_key on every GET, so there is no show-once model.
    curl "https://apx.didit.me/auth/v2/organizations/me/<ORG_ID>/applications/<APP_ID>/" \
      -H "Authorization: Bearer $TOK"
  7. Or take the console route with no curl at all. Sign in at business.didit.me, pick the Application from the dropdown, open Developers then API keys, and copy the Primary key or create a scoped key for a service or partner.

Field mapping: what each response field is for

Mapping the credential response to the header you send
Response fieldValue you getWhere it goes
access_tokenRS256 JWT, 86400 seconds by defaultAuthorization: Bearer on apx.didit.me/auth/v2
refresh_tokenRS256 JWTRefresh flows on the Auth API
application.api_keysk_live_ plus 43 charactersx-api-key on verification.didit.me, live and billed
sandbox_application.api_keysk_test_ plus 43 charactersx-api-key on verification.didit.me, mocked and never billed
client_idApplication identifier returned with the credentialsOAuth-style introspection only
application.uuidUUIDPath parameter for application endpoints
data_locationFor example eu for IrelandRead-only, tells you where verification data is stored and processed

MCP tokens and the didit:management scope

When an AI assistant connects to https://mcp.didit.me/mcp, it works with an OAuth grant rather than a raw api_key. Reading an application record, including its client_id and api_key, needs a grant that carries the didit:management scope. A grant limited to didit:verification is refused with 403 This token's scope does not permit this action. and no credential comes back. That refusal is a scope problem, not a wrong-token problem, so regenerating the token without widening the scope changes nothing.

Video thumbnail explaining how to use Didit with an MCP client
MCP clients reach the same account and verification surfaces, with scope deciding which actions are allowed.

401 and 403 on the Didit API: what each one means and the fix

Rely on the status first and on code when it is present, because message text can change. The table below is the practical version of the API errors page.

Authentication and permission errors on the Didit API
What you sentStatusBody detailFix
Wrong, malformed or revoked key to verification.didit.me401Authentication credentials were not provided or are invalid.Check the value of DIDIT_API_KEY or recover the key
Expired key401This API key has expired.Create a fresh key in Developers then API keys
No x-api-key header at all403You do not have permission to perform this action.Add the header. This is the signature of a missing key, not a bad key
Scoped key without access to this resource or action403This API key has no access to this endpoint.Use a key whose access covers that product, or the Primary key
Key used from outside its IP list403This API key can't be used from this IP address.Call from an allowed address or change the key's IP list
Key limited to some workflows or statuses, on an endpoint it cannot use403This API key only reaches sessions inside its workflow or status limits, so it can't use this endpoint.Move the key's limits or use one that covers the endpoint
Key limited to workflows or statuses, on a session outside them404Session not found.Expected behavior. The session exists but this key cannot see it
Key of a just-deleted application403This application was deleted. with code application_deletedDo not retry. Use a key of an application that exists
No Authorization header on apx.didit.me403You do not have permission to perform this action.Send the JWT as Authorization: Bearer <access_token>
Expired or invalid JWT on apx.didit.me401Expired access token or Invalid access tokenCall POST /auth/v2/programmatic/login/ again
MCP grant without didit:management403This token's scope does not permit this action.Reconnect with the management scope
Balance cannot cover the call403 or 402insufficient_credits on some familiesTop up at business.didit.me

Why a working key returns 403 on workflows or questionnaires

A 403 on a workflows or questionnaires route almost always means the request went out with a key that has no access to that resource or action, or with no key at all. Session creation with an empty header returns exactly You do not have permission to perform this action. The fix is the same in both cases: print the header you actually send, compare it with the Primary key in Developers then API keys, and use a key whose access covers the endpoint.

Why the bank data API returns 403 forbidden

The bank account check sits on the verification host, so it needs x-api-key like everything else. A 403 there means one of three things: the key is scoped without access to that product, the request came from outside the key's IP list, or the balance cannot cover the call. Use a full access key or one scoped to bank checks, and note that POST /v3/bank/account-check/ reports a low balance as 402 with code insufficient_credits rather than as a 403.

401 versus 403 in one line

401 means the credential you sent is invalid, and 403 means the request was not allowed: no key at all, a key without access to that resource or action, a call from outside its IP list, or a balance that cannot cover the call. On the Auth host the same split applies: 401 for an invalid or expired Bearer token, 403 for a missing token or insufficient privileges.

429 and Retry-After

Rate limits are per identifier, using the x-api-key header first and the client IP only when no key is sent, with a 60-second fixed window. Global ceilings are 600 requests per minute for GET and 300 for POST, PATCH and DELETE, and transaction and event ingestion gets 600 per minute. Session creation is capped at 600 per minute, the v1 and v2 decision routes at 100 per minute, PDF generation at 50 per minute. A 429 carries Retry-After in seconds plus X-RateLimit-Scope, X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and the body adds a reference you can quote to support. Wait the Retry-After value, then add jittered backoff, and stop after a small number of attempts. One key per workload keeps a noisy service from starving the rest.

Test with sandbox data before you go live

The sandbox application key starts with sk_test_. Every check is mocked and never billed, and each sandbox application can create 500 test sessions every 24 hours. Point DIDIT_API_KEY at that key, create a session with the curl from step 4, and confirm you get a session back instead of a 401 or 403. Then run the failure cases on purpose, because each one has a distinct signature you will meet in production.

Session overview screen in the Didit Business Console showing a completed verification
The session a sandbox call creates shows up in the console with its checks, so you can confirm the key reached the right application.
Sandbox test cases and expected results
TestExpected resultWhat it proves
Valid sk_test_ key on POST /v3/session/Session created, nothing billedHeader name and host are correct
Same call with no x-api-key403 You do not have permission to perform this action.A missing header looks like a permission error
Same call with a scrambled key401 Authentication credentials were not provided or are invalid.A bad value looks like a credential error
Bearer JWT sent to verification.didit.me403 You do not have permission to perform this action.The verification host does not read OAuth tokens, so the request arrives with no x-api-key header
Live key with no balance400 on session create, 403 or 402 on other familiesBilling failures are not key failures

Rotation and disconnect

The credentials endpoint does not rotate a key, it returns the current one. To move off a key, create a new key next to the Primary key in Developers then API keys, deploy it, confirm traffic is clean, then stop using the old value. When an application is deleted its keys answer 403 application_deleted for a few minutes and are then refused like any invalid key, so do not retry that one. Sandbox keys cost nothing and can be discarded at any time.

Cost of both ends

Credentials are free. API keys, JWTs, the MCP server, the workflow orchestrator and reusable KYC carry no line item. You pay per completed check from prepaid credit at the published list prices, and plan discounts apply to Didit prices only, never to carrier or Meta pass-through charges.

Worked example, one month of 2,000 full ID checks and 2,000 AML screenings at list price:

  • 2,000 full ID checks at $0.33 = $660.00
  • 2,000 AML screenings at $0.20 = $400.00
  • Total = $1,060.00

On Growth the same month carries a $99.00 monthly fee, $115.00 of monthly credit and 4% off every Didit price. The discounted usage first: 2,000 times $0.3168 = $633.60 for ID checks, 2,000 times $0.192 = $384.00 for AML, subtotal $1,017.60. Apply the credit and the fee: $99.00 + ($1,017.60 - $115.00) = $1,001.60, assuming the whole credit is used against these two lines.

On Scale the fee is $299.00, the monthly credit is $350.00 and the discount is 10%: 2,000 times $0.297 = $594.00 for ID checks, 2,000 times $0.18 = $360.00 for AML, subtotal $954.00. Apply the credit and the fee: $299.00 + ($954.00 - $350.00) = $903.00. Both plans land under the $1,060.00 pay-as-you-go total at this volume once the included credit is counted, and Scale is the cheaper of the two.

Free plan credit is $10.00 a month for eligible organizations and does not roll over. Top-ups run from $50 to $20,000, are added at face value and last 12 months.

Video thumbnail explaining Didit credits, auto-recharge and volume discounts
Billing runs on prepaid credit, so a failed check never turns into an unpaid invoice.

Sources

Next step: create an application in the sandbox at business.didit.me, copy the sk_test_ key from Developers then API keys, and send it as x-api-key to https://verification.didit.me/v3/session/. No sales call, and nothing in the sandbox is billed.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

What is the difference between a Didit API key and an access token?

The api_key is a long-lived application secret you send as x-api-key on every call to https://verification.didit.me/v3/.... The access_token is a 24-hour RS256 JWT you send as Authorization: Bearer to Account Management endpoints on https://apx.didit.me/auth/v2. They are not interchangeable and neither host accepts the other one.

Which Didit host do I call with x-api-key?

Every route under https://verification.didit.me/v3/, which covers sessions, workflows, questionnaires, AML screening, transactions, bank checks, lists, webhooks and billing. That host uses the API key and never a Bearer token. Account, organization and application management lives on https://apx.didit.me/auth/v2 and uses the JWT.

Why do I get a 401 unauthorized on verification.didit.me with my x-api-key?

The key you sent is wrong, malformed, revoked or expired. The body reads Authentication credentials were not provided or are invalid. for a bad value, or This API key has expired. for an expired one. Recover the current key with a login then a GET on the application record, or create a new key in Developers then API keys.

Why do I get 403 "You do not have permission to perform this action." with x-api-key?

On the verification host that exact message is what a request with no x-api-key header returns. On the Auth host the same message means the request had no Authorization header. Confirm the header is actually on the wire before you change the key value, because a missing header and a wrong key produce different statuses.

When is it a 403 instead of a 401 on the Didit API?

401 means the credential you presented is invalid. 403 means the request was not allowed: no key at all, a scoped key without access to that resource or action, a call from outside the key's IP list, or a balance that cannot cover the call. Read the body, because each of those cases has its own detail string and its own fix.

Why does my key return 403 on workflows or questionnaires when sessions work?

The key is scoped to a narrower set of resources than the endpoint you are calling. Scoped keys exist so a service or partner gets only the access it needs, and a key created for sessions may not reach workflows or questionnaires. Use a key whose access covers that endpoint, or the Primary key of the application.

Why does the Didit bank data API return 403 forbidden?

The bank account check needs x-api-key on verification.didit.me and a key that covers the resource. A 403 means a scope gap, an IP list mismatch or an uncovered balance, while a low balance on POST /v3/bank/account-check/ comes back as 402 with code insufficient_credits. Use a full access key or one scoped to that product and check the balance.

Do I need the JWT access token to create a verification session?

No. Session creation uses x-api-key. The JWT is only for Account Management endpoints at apx.didit.me/auth/v2, such as listing organizations or reading an application record. Sending the JWT to the verification host without an x-api-key header returns 403 because that host does not authenticate with Bearer tokens.

What is the client ID used for in a Didit application record?

client_id is returned alongside api_key and exists for OAuth-style introspection scenarios. Routine verification calls need only api_key in the x-api-key header. Do not send client_id as an authentication header.

Why does my MCP token get 403 "This token's scope does not permit this action."?

An MCP grant reaches application records only with the didit:management scope. A grant limited to didit:verification is refused with exactly that message and returns no credential. Reconnect the client with the management scope instead of regenerating an identical token.

What should I do with a 429 from the Didit API?

Read the Retry-After header, which is present only on 429 responses, and wait at least that long before retrying. Add exponential backoff with jitter on top and stop after a few attempts. Save the reference field from the body if you report the throttle to support.

Does a Didit API key expire?

Some keys do expire, and an expired one returns 401 with This API key has expired. The key you get from programmatic registration is a long-lived application secret, while the JWT access_token defaults to 86400 seconds. Never validate a key by its prefix, since keys created before the sk_live_ and sk_test_ formats have none and keep working.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.