# Restricted IAM key works for grants API but token endpoint rejects it

**URL:** <https://forums.nylas.com/t/restricted-iam-key-works-for-grants-api-but-token-endpoint-rejects-it/1269>\
**Category:** Question and Answers\
**Created:** [October 26, 2026, 11:51am UTC](https://forums.nylas.com/t/restricted-iam-key-works-for-grants-api-but-token-endpoint-rejects-it/1269 "2026-10-26T11:51:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobs](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jobs](https://forums.nylas.com/u/jobs)\
**Post date:** [October 26, 2026, 11:51am UTC](https://forums.nylas.com/t/restricted-iam-key-works-for-grants-api-but-token-endpoint-rejects-it/1269/1 "2026-10-26T11:51:14Z")

</div>

We are using an existing free US Sandbox application with an active application-bound IAM principal. It has no roles and only grants.create, grants.read and grants.delete. Its API credential is active and unexpired.

GET /v3/grants succeeds with HTTP200 using this key as a Bearer token. Hosted OAuth returns a code and our backend exchanges it within seconds using the same app ID, exact registered callback, grant\_type=authorization\_code and this key in client\_secret. The token endpoint returns HTTP400, api.auth\_failed /25022, Invalid credentials provided. No grant is created.

We also reproduced invalid\_authentication / Invalid credentials provided using the documented client\_credentials grant type with a deliberately nonexistent synthetic grant ID, without Google interaction. Adding the same key as a Bearer header did not change the outcome. Deliberately invalid authorization codes instead return invalid\_grant, so that probe alone does not verify credential acceptance.

The IAM documentation says IAM keys may be used anywhere a Nylas API key is used, while the hosted OAuth documentation specifies an API key in client\_secret.

Does POST /v3/connect/token support application-bound IAM keys in client\_secret? If so, what exact grant-management permission or request format is required? Is there a known issue involving restored principal application bindings? We need a supported fix preserving the current scope and credential expiry. We cannot use an unrestricted application key, broaden roles/permissions, upgrade plans, or ask the user to repeat OAuth until this is resolved.

No credentials, codes, personal email addresses, application/principal identifiers or request identifiers are included here. Redacted diagnostics can be provided if needed through an appropriate private channel.

---

<div class="post-metadata">

**Author:** ![Samuel.R](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Samuel.R](https://forums.nylas.com/u/Samuel.R)\
**Post date:** [October 26, 2026, 11:53am UTC](https://forums.nylas.com/t/restricted-iam-key-works-for-grants-api-but-token-endpoint-rejects-it/1269/2 "2026-10-26T11:53:42Z")

</div>

Hello. Our Support team has reached out to you via email to continue this investigation. Please check your mailbox for our message.

---

<div class="post-metadata">

**Author:** ![Samuel.R](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Samuel.R](https://forums.nylas.com/u/Samuel.R)\
**Post date:** [October 26, 2026, 11:53am UTC](https://forums.nylas.com/t/restricted-iam-key-works-for-grants-api-but-token-endpoint-rejects-it/1269/3 "2026-10-26T11:53:51Z")

</div>

Closed on October 26, 2026, 11:53am UTC


