marcoflopes | 2023-05-31 18:09:41 UTC | #1
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 PCUSER, PCGROUP or PCOAUTHCLIENT. 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
tim.smith | 2023-05-31 18:18:36 UTC | #2
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.
marcoflopes | 2023-05-31 18:44:08 UTC | #3
Hello Tim Thanks for the answer
my question is about the subjectType parameter
String subjectType = "PCUSER"; // String | what the type of the subjects are (PCGROUP, PCUSER or PCOAUTH_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":[]}
tim.smith | 2023-05-31 19:16:49 UTC | #4
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.
system | 2023-07-01 19:17:05 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 20206