The ID token API asynchronously retrieves an [OpenID Connect ID Token](https://openid.net/specs/openid-connect-core-1_0.html#IDToken%5C) from Shopify that can be used to ensure that requests came from a Shopify authenticated user. See the [ID Token documentation](/docs/apps/auth/oauth/session-tokens) from more information.
await shopify.idToken();
The `idToken` API is available on the `shopify` global. It asynchronously retrieves an OpenID Connect ID Token from Shopify.
Asynchronously returns an ID token.
export type IdTokenApi = () => Promise<string>;