Abe Clark
08/19/2025, 6:59 AMGET <https://api.permit.io/v2/facts/963052528a05464f81806c264751d0ea/8671f6b2ae42487fa851e9f6c43a8cbd/user_invites/fe250482c2ab403795f8312f06a48aa0>
Including Authorization Bearer header
{
"id": "73576d6c002d4a60bfe01d1b51ee729c",
"title": "The request could not be completed",
"error_code": "UNEXPECTED_ERROR",
"message": "You did nothing wrong, but we could not finish your request due to a technical issue on our end. Please try again.\nIf the issue keeps happening, contact our support on Slack for further guidance."
}Ask Inkeep
08/19/2025, 6:59 AMAsk Inkeep
08/19/2025, 6:59 AM963052528a05464f81806c264751d0ea and environment 8671f6b2ae42487fa851e9f6c43a8cbd
2. *What calls are they performing (as SDK code or CURL) * - You've provided the GET request, but a full CURL example would be helpful
3. *Which PDP version they are running* - Please share your PDP version
4. *To share relevant logs from their PDP* - Any logs around the time of this error
For immediate support, you can reach out over Email .Ask Inkeep
08/19/2025, 7:00 AMAbe Clark
08/19/2025, 7:00 AMAbe Clark
08/19/2025, 7:12 AMAbe Clark
08/19/2025, 7:12 AMAsk Inkeep
08/19/2025, 7:12 AMAsk Inkeep
08/19/2025, 7:12 AMinvite_code field (1) :
/**
* The invite code that is sent to the member\'s email
* @type {string}
* @memberof InviteRead
*/
invite_code: string;
The InviteStatus enum shows the possible states :
export const InviteStatus = {
Pending: 'pending',
Accepted: 'accepted',
Failed: 'failed',
Canceled: 'canceled',
} as const;
However, I don't see an approve method documented in the available Node.js SDK sources. The sources show invite data structures but not the methods for approving invites.
Since this appears to be a gap in functionality or documentation, could you provide:
1. Which Workspace / Project / Env you're using
2. Your exact SDK calls (the code you're trying to use)
3. Which PDP version you're runningAsk Inkeep
08/19/2025, 7:13 AMAbe Clark
08/19/2025, 7:15 AMAsk Inkeep
08/19/2025, 7:15 AMAsk Inkeep
08/19/2025, 7:15 AMinvite_code query parameter (like `https://test.com/?invite_code=ed32bc43e2194a80a5ef5e0339943b44`) , you can approve the user using an SDK .
The example shows using the Python SDK :
await permit.api.users.approve(
user_key="new_user",
email="<mailto:new-user@example.com|new-user@example.com>",
invite_code="ed32bc43e2194a80a5ef5e0339943b44"
)
This approve method validates that the user has a valid email address and creates the approved user with their assigned role .
The Ruby SDK documentation also shows the invite structure with an invite_code field that's sent to the member's email (2) :
instance = OpenapiClient::InviteRead.new(
email: null,
role: null,
id: null,
organization_id: null,
invite_code: null,
created_at: null,
status: null,
failed_reason: null
)
While the Node.js SDK may not have the approve method documented in the available sources, the pattern from other SDKs suggests looking for a similar users.approve() method that accepts the user_key, email, and invite_code parameters.Ask Inkeep
08/19/2025, 7:15 AMAlon Boshi
08/19/2025, 8:10 AMAbe Clark
08/19/2025, 8:57 AMAlon Boshi
08/19/2025, 1:31 PMAbe Clark
08/19/2025, 4:23 PMAlon Boshi
08/20/2025, 9:16 AMget_user_invite.
.approve (I assume that’s what you meant) is responsible for creating the user and assigning the role on the tenant based on the configured user_invite.Abe Clark
08/20/2025, 9:26 AMAlon Boshi
08/20/2025, 9:35 AMAbe Clark
08/20/2025, 10:05 AMAbe Clark
08/20/2025, 7:12 PM{
"key": "test-key",
"id": "40d471afa81a46ffb8758f5bccff941a",
"organization_id": "dfc4d67c54f64ea79eb0ff0864c07cca",
"project_id": "963052528a05464f81806c264751d0ea",
"environment_id": "8671f6b2ae42487fa851e9f6c43a8cbd",
"associated_tenants": [
{
"tenant": "default",
"roles": [],
"status": "pending",
"resource_instance_roles": []
}
],
"roles": [],
"created_at": "2025-08-20T19:08:36+00:00",
"updated_at": "2025-08-20T19:08:36+00:00",
"email": "<mailto:abeaclark+test45asdfasdfasdf@gmail.com|abeaclark+test45asdfasdfasdf@gmail.com>",
"first_name": null,
"last_name": null,
"attributes": {}
}Permit Support Automation
08/20/2025, 7:12 PMOr Weis
08/20/2025, 7:37 PMOr Weis
08/20/2025, 7:38 PMOr Weis
08/20/2025, 7:39 PMAbe Clark
08/20/2025, 7:43 PMOr Weis
08/20/2025, 7:44 PMfirst/last name for users, so making those required feels a bit heavy handed.This was decided back in my living room (garage mode) in 2021, and has stuck as backward compatibility 😅 But yeah maybe it’s time to change that as well CC: @Shuvy Ankor
Abe Clark
08/20/2025, 7:45 PMAbe Clark
08/20/2025, 8:00 PMOr Weis
08/20/2025, 8:03 PMAbe Clark
08/20/2025, 8:06 PMAbe Clark
08/20/2025, 8:22 PMbody: {
email: '<mailto:abeaclark+test45sdaf@gmail.com|abeaclark+test45sdaf@gmail.com>',
tenant_key: 'default',
role: 'Editor',
permission_level: 'LEVEL_2',
type: 'create_user'
},Or Weis
08/20/2025, 8:25 PMAbe Clark
08/20/2025, 8:26 PMAbe Clark
08/22/2025, 6:32 PMPermit Support Automation
08/22/2025, 6:32 PMEli Moshkovich
08/22/2025, 6:38 PMAbe Clark
08/22/2025, 6:40 PMShuvy Ankor
08/23/2025, 6:34 PMAbe Clark
08/27/2025, 7:19 PMpermit support automation2
08/27/2025, 7:19 PMNatalia Edelson
08/27/2025, 7:38 PMAbe Clark
08/27/2025, 7:43 PMShuvy Ankor
08/27/2025, 8:09 PMAbe Clark
08/27/2025, 8:16 PMAbe Clark
08/27/2025, 8:16 PMShuvy Ankor
08/27/2025, 8:32 PMAbe Clark
08/27/2025, 8:38 PMShuvy Ankor
09/02/2025, 2:06 PMAbe Clark
09/02/2025, 5:35 PMShuvy Ankor
09/04/2025, 2:18 PMAbe Clark
09/04/2025, 6:18 PMpermit support automation2
09/04/2025, 6:18 PMAbe Clark
09/12/2025, 9:31 PM{
"id": "a925ec9a138c4770a394307692da2e90",
"title": "The request could not be completed",
"error_code": "UNEXPECTED_ERROR",
"message": "You did nothing wrong, but we could not finish your request due to a technical issue on our end. Please try again.\nIf the issue keeps happening, contact our support on Slack for further guidance."
}permit support automation2
09/12/2025, 9:32 PMAbe Clark
09/12/2025, 9:40 PM{
"email": "<REDACTED>",
"key": "test-key",
"attributes": {
"test": "123"
}
}
{
"id": "658f6066b8274e65ac8c583aab6e3b21",
"title": "The request could not be completed",
"error_code": "UNEXPECTED_ERROR",
"message": "You did nothing wrong, but we could not finish your request due to a technical issue on our end. Please try again.\nIf the issue keeps happening, contact our support on Slack for further guidance."
}Or Weis
09/12/2025, 9:43 PMAbe Clark
09/12/2025, 9:56 PMOr Weis
09/13/2025, 5:20 AMShuvy Ankor
09/14/2025, 7:18 AMAbe Clark
09/14/2025, 7:32 AMOr Weis
09/14/2025, 11:53 AMShuvy Ankor
09/16/2025, 8:55 AMAbe Clark
09/16/2025, 6:49 PMpermit support automation2
09/16/2025, 6:49 PMOr Weis
09/16/2025, 6:54 PMAbe Clark
09/16/2025, 6:57 PMShuvy Ankor
09/16/2025, 7:32 PM{
"email": "<mailto:user@eamil.com|user@eamil.com>",
"key": "test-key",
"attributes": {
"test": "123"
}
}
3. If a user with that key exists but has a different email, we update to the new email address In your case, there was already a user with the key “test-key”, so the system updated their email accordingly.Abe Clark
09/16/2025, 7:41 PMAbe Clark
09/18/2025, 6:39 AMShuvy Ankor
09/18/2025, 6:47 AMAbe Clark
09/18/2025, 6:54 AMAbe Clark
09/18/2025, 6:55 AMAbe Clark
09/18/2025, 6:58 AMShuvy Ankor
09/18/2025, 7:04 AMAbe Clark
09/18/2025, 7:06 AMAbe Clark
09/18/2025, 7:07 AMAbe Clark
09/18/2025, 7:07 AMAbe Clark
09/18/2025, 7:14 AM{
detail: 'Email: <mailto:45@gmail.com|45@gmail.com> does not match the email of the invite: <mailto:999@gmail.com|999@gmail.com>'
}
https://permit-io.slack.com/archives/C02RTML2WNN/p1758051162087099?thread_ts=1755586781.430919&cid=C02RTML2WNNShuvy Ankor
09/18/2025, 7:18 AMAbe Clark
09/18/2025, 7:19 AMShuvy Ankor
09/18/2025, 7:24 AMresource_instance_key directly in email links:
https://docs.permit.io/embeddable-uis/email-configuration-and-templates/#templates-variables
2. Enhanced Webhooks
We’ve added resource_instance_key to webhooks as well. Currently, this works when email configuration is enabled, but we’re planning to make it work independently in the future:
https://docs.permit.io/embeddable-uis/webhooks#rebac
Hope these features help streamline your implementation!Abe Clark
09/18/2025, 7:31 AMAbe Clark
09/18/2025, 7:38 AMOr Weis
09/18/2025, 7:48 AMAbe Clark
09/18/2025, 7:49 AMAbe Clark
09/18/2025, 7:49 AMOr Weis
09/18/2025, 7:51 AMAbe Clark
09/18/2025, 7:51 AMAbe Clark
09/18/2025, 7:53 AM"roles": [
{
"role": "admin",
"tenant": "stripe-inc"
},
{
"role": "viewer",
"tenant": "<http://othercompany.com|othercompany.com>"
}
]Abe Clark
09/18/2025, 7:53 AMShuvy Ankor
09/18/2025, 8:04 AMShuvy Ankor
09/18/2025, 9:43 AMget_user_invite.
Please give it a try and let me know if everything works as expected - we’d really appreciate your feedback as we’re actively working on improvements in this area.
Thanks!Shuvy Ankor
09/18/2025, 10:05 AM