Closed pavittarx closed 3 months ago
Same response with the API as well,
Hello @pavittarx and thank you for the report. It's seems that there is an issue with the response of the endpoint or our documentation / backend API ref. I will investigate it and provide feedback soon
After investigating the cause of your issue is that you are using the endpoint to retrieve instance invitations from the backend API, but you want to retrieve organization invitation. This is not an issue in the API response, you need to use the current endpoint to retrieve the organization invitations.
curl -v -H "Authorization: Bearer {secretKey}" "https://api.clerk.com/v1/organizations/{orgID}/invitations?limit=10&offset=0"
or
// based on your screenshot
await clerk.organizations.getOrganizationInvitationList()
API ref: https://clerk.com/docs/reference/backend-api/tag/Organization-Invitations#operation/ListOrganizationInvitations cc: @pavittarx
Closing this issue but feel free to open a new one if there is still an issue.
Preliminary Checks
[X] I have reviewed the documentation: https://clerk.com/docs
[X] I have searched for existing issues: https://github.com/clerk/javascript/issues
[X] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://replit.com/@PavittarSingh1/ClerkBackendAPI-1
Publishable key
pk_test_aGVscGluZy1qYWd1YXItODguY2xlcmsuYWNjb3VudHMuZGV2JA
Description
Steps to reproduce:
getInvitationList
Javascript Backend API.Expected behavior: The list should list at the very least the pending invitations.
Actual behavior: Empty list is being returned. However the list of pending invitations shows up in the UI component.
Environment