Skip to content

Cross App Access (XAA)

Let your identity provider give tools and AI assistants access to the My Journey Analytics API with ID-JAG token exchange, without personal API keys.

Cross App Access, or XAA, lets your identity provider decide which tools can use the My Journey Analytics API on a person's behalf. The tool asks your identity provider for an identity assertion, called an ID-JAG (Identity Assertion JWT Authorization Grant), and exchanges it with us for a short-lived access token. People don't need to create a personal API key or sign in to each tool separately.

Cross App Access is available on plans that include Cross App Access (XAA). It is set up per verified domain, so your plan also needs Verified domains, and the domain must be verified first; see Authentication domains and single sign-on. Only organization admins and owners can set it up.

Set up Cross App Access

  1. Open Settings → Organization → Authentication.
  2. Next to the verified domain, open the menu (⋯) and choose Configure XAA.
  3. Fill in the dialog, then select Save settings.
FieldWhat to enter
IdP issuer URLYour identity provider's issuer URL. It must match the iss claim of the ID-JAGs it issues for people on this domain.
JWKS URL (optional)Where to find your identity provider's signing keys. Leave it empty to discover them from the issuer URL's OpenID configuration.
Allowed client IDs (optional)The client_id values to accept. Leave it empty to accept any client.

Cross App Access only turns on once the issuer URL is filled in. You can save the other fields first and add it later. The XAA badge in the domain's Integrations column shows once it is on.

Scopes

Each access token carries scopes that limit what it can do. In your identity provider, grant user:read, plus the scopes each tool needs. For APIs that work on a project, also grant organization:read and project:read.

The token gets only the scopes that are both in the ID-JAG and, if the tool asks for specific scopes, in its request. A request that needs a scope the token doesn't have is refused with an insufficient-scope error.

Exchange an ID-JAG for an access token

The tool sends the ID-JAG to our token endpoint:

POST https://app.myjourneyanalytics.com/oauth/token/
bash
curl -X POST https://app.myjourneyanalytics.com/oauth/token/ \
  -d grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer \
  -d assertion=<ID-JAG from your identity provider> \
  -d client_id=<the tool's client ID> \
  -d "scope=user:read project:read"

client_id and scope are optional. If client_id is sent, it must match the ID-JAG's client_id. The body can be form-encoded, as above, or JSON.

A successful response looks like this:

json
{
  "access_token": "<access token>",
  "token_type": "Bearer",
  "expires_in": 7200,
  "scope": "user:read project:read"
}

The tool then calls the API with the token in an Authorization: Bearer header. The token lasts for the number of seconds in expires_in. There is no refresh token: when it expires, the tool gets a new ID-JAG and exchanges it again.

The token endpoint is also listed, with support for this grant, at https://app.myjourneyanalytics.com/.well-known/oauth-authorization-server.

What the ID-JAG must contain

ClaimRequirement
issYour identity provider's issuer URL, as entered in IdP issuer URL
subThe person's ID at your identity provider
emailThe person's email address, on the verified domain. If it is missing, sub is used as the email address.
email_verifiedMust not be false
audhttps://app.myjourneyanalytics.com
resourcehttps://app.myjourneyanalytics.com
client_idThe tool's client ID, and one of Allowed client IDs if you set any
scopeThe scopes granted, separated by spaces
exp, iatWhen it expires and when it was issued
jtiOptional. A unique ID; an ID-JAG with a jti can be used only once.

The ID-JAG must be signed with one of your identity provider's keys, and its header typ must be oauth-id-jag+jwt. The person must already be an active member of your organization; Cross App Access does not create accounts.

Errors

The token endpoint answers with an error and an error_description:

errorUsually means
invalid_requestThe assertion is missing.
invalid_grantThe ID-JAG could not be verified: wrong issuer, signature, audience or domain, expired, already used, or the person isn't a member.
invalid_clientThe client_id isn't in Allowed client IDs.
invalid_targetThe resource claim isn't https://app.myjourneyanalytics.com.
access_deniedYour plan doesn't include Cross App Access (XAA).

Can't find what you need? Contact support