Hi all,
Can someone help me to resolve a problem with authorization api?
i have a doubt about subjectType parameter in the postAuthorizationRole method.
consulting the documentation at https://developer.genesys.cloud/devapps/sdk/docexplorer/purecloudjava/AuthorizationApi#postAuthorizationRole
need to send PC_USER, PC_GROUP or PC_OAUTH_CLIENT. But I get the response COULD NOT FIND PC_USER
what is the function of this parameter and why do I get this response? even sending the empty parameter, I get the same error
Thanks
This request worked for me where the subject ID is a user id.
POST /api/v2/authorization/roles/00000000-0000-0000-0000-000000000000?subjectType=PC_USER HTTP/1.1
Host: api.mypurecloud.com
Authorization: Bearer **************************************************************************************
Content-Type: application/json
{"subjectIds":["00000000-0000-0000-0000-000000000000"],"divisionIds":["00000000-0000-0000-0000-000000000000"]}
If this is what you're doing and it's causing that error, please open a case with Genesys Cloud Care to investigate.
Hello Tim
Thanks for the answer
my question is about the subjectType parameter
String subjectType = "PC_USER"; // String | what the type of the subjects are (PC_GROUP, PC_USER or PC_OAUTH_CLIENT)
in the subjectID parameter I am putting the user id
{"message":"Could not find PC_USER(s): 3f1e26a9-96fd-XXXX-XXXX-028d95257b5e","code":"not.found","status":404,"contextId":"3d087ce8-f149-XXXX-XXXX-82b01b707bd3","details":[],"errors":[]}
If the user id you're sending is a valid user id, you'll need to open a case with Care to investigate why it's returning a 404 for a valid user id.
1 Like
system
Closed
July 1, 2023, 7:17pm
5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.