App Events API: Auth endpoint response does not include fields documented in the API reference

Hi, I have been trying out the App Events API, and I am confused with the following behavior.

The App Events API reference ( App Events API reference ) says the access token response contains access_token, scope and expires_in, with this example:

{
  "access_token": "f8563253df0bf277ec9ac6f649fc3f17",
  "scope": "write_global_api_app_events",
  "expires_in": 3599
}

The actual response only contains access_token and token_type:

{
  "access_token": "<JWT>",
  "token_type": "Bearer"
}

How to reproduce

curl -s -X POST https://api.shopify.com/auth/access_token \
  -H 'User-Agent: example' \
  -H 'Content-Type: application/json' \
  -d '{"client_id":"<client_id>","client_secret":"
<client_secret>","grant_type":"client_credentials"}'

I have x-request-id logged, so please let me know if you need it.

By the way, it seems that you need to set User-Agent header for the endpoint to work, otherwise it returns 403. It might be good to add this to the documentation.

Is anyone having the same issue?

I think this is a bug / documentation error.

Hi @shunten31, I had a look for you and the endpoint currently returns only access_token and token_type: "Bearer" for the client credentials grant. The scope and expires_in fields shown in the App Events API reference don’t match the actual response.

Scope and expiry moved into the token itself. Decode the JWT (the docs suggest jwt.io) and the exp claim gives the expiry (tokens last 60 minutes), while the space-separated scopes claim shows what was granted. Refresh before exp rather than relying on expires_in. This thread took the same approach, using the scopes claim to check granted scopes.

For the 403, I can confirm a blank User-Agent header gets rejected, so it’s worth keeping one set in whatever HTTP client you’re using.

I’ve raised the docs mismatch with the team so the reference can be corrected - thanks for raising this here!