"Permissions parameter is required" when updating Role Permissions
I am invoking this endpoint of the Kinde Management API to update the permissions of particular Role:
https://docs.kinde.com/kinde-apis/management/#tag/roles/patch/api/v1/roles/{role_id}/permissions
However, the following error object is being returned:
Error: [{"code":"PERMISSIONS_REQUIRED","message":"Permissions parameter is required"}]
This is the body of my PATCH request:
{"permissions":[{"id":"{UUID1}"},{"id":"{UUID2}"}]}
Can someone tell me what am I doing wrong?
Kinde docs
Kinde Management API
The management API is for managing your Kinde account. Most things that can be done via the Kinde admin UI can be done with this API
3 Replies
Hi, Thanks for reaching out.
The error "PERMISSIONS_REQUIRED" suggests that the API is not recognizing your
let me know if this helps,
Thanks.
The error "PERMISSIONS_REQUIRED" suggests that the API is not recognizing your
permissions
parameter properly. This could be due to several issues:
1. Content-Type Header Ensure you're sending the request with the correct Content-Type: application/json
header
2. Request Body Structure According to the API documentation, the body should be structured exactly as:
3. Authentication Verify that you're properly authenticated with a bearer token that has the required update:role_permissions
scope
4. Permission ID Format Make sure the permission IDs you're using ({UUID1}
, {UUID2}
) are valid permission IDs that exist in your Kinde environment
5. Role ID in URL Confirm that the {role_id}
in your URL path is correct and the role exists.let me know if this helps,
Thanks.
Thanks, I had the headers for "Accept: application/json" but not "Content-Type: application/json" haha
Glad it works,
Let us know if you need anything else.
Thanks.
Let us know if you need anything else.
Thanks.