Create Identity Token
Creates a short-lived OIDC identity token for the app, account, or user that owns your API key. Send it to a service outside Whop to prove who is calling, with no shared secret. The runtime claim says where your code runs. It is whop when your app’s server on Whop hosting created the token, and external for an API key used anywhere else. A whop token also has env, which is production for the live build and preview for any other build, and app_build_id, the build that runs. The sub claim joins these as key:value segments, from the runtime to the environment. An app on Whop hosting gets runtime:whop:account:biz_xxxxxxxxxxxxx:app:app_xxxxxxxxxxxxx:env:production. The same app’s API key used anywhere else gets runtime:external:account:biz_xxxxxxxxxxxxx:app:app_xxxxxxxxxxxxx. An account API key gets runtime:external:account:biz_xxxxxxxxxxxxx, and a user API key gets runtime:external:user:user_xxxxxxxxxxxxx. A service that matches a subject by prefix must end the prefix on a full segment and its :. The account_id, app_id and user_id claims carry the same IDs one by one. The typ claim is always identity, which no other Whop token carries. The api_key_id claim is the API key that created the token. The iss claim is https://api.whop.com, and the service finds the signing keys through https://api.whop.com/.well-known/openid-configuration. Your app’s server on Whop hosting can call this endpoint with no key of its own. A session, an OAuth token, or a token created from an API key cannot create an identity token.
Authorizations
An Account API key, an App API key, or a user API key. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
255"d9105228-4a08-46b1-8b91-42fed586d383"
Body
The service that verifies the token, as that service names itself. It becomes the aud claim. The service must reject a token with another audience. It must be a URL or a hostname, such as https://database.example.com or sts.amazonaws.com.
255"https://database.example.com"
Response
an identity token was created

