Update user API giving unauthorised error #164
Replies: 8 comments 12 replies
-
@snehalsabade @komalm @paritshivani , @Renuka-S Please user the below curl to add/remove a user to any org. |
Beta Was this translation helpful? Give feedback.
-
Hello @AmiableAnil, {{host}}user/v1/read/7bfcd45f-7cc6-44c1-96b6-660fa853fb1b |
Beta Was this translation helpful? Give feedback.
-
@snehalsabade PUBLIC is a default role in the system. Please try with a different role. Entry of the same can be found in 'sunbird.user_roles' table in cassandra. |
Beta Was this translation helpful? Give feedback.
-
Hello @AmiableAnil ,
Request - curl '{{host}}/learner/user/v2/role/assign' Response - Case 2- curl '{{host}}/learner/user/v2/role/assign' Request- Response - |
Beta Was this translation helpful? Give feedback.
-
@snehalsabade two observations here,
|
Beta Was this translation helpful? Give feedback.
-
Hello @BharathwajShankar,
cc @komalm , @paritshivani , @Renuka-S |
Beta Was this translation helpful? Give feedback.
-
Closing this thread. Please feel free to reopen if required. |
Beta Was this translation helpful? Give feedback.
-
@gandham-santhosh cc @komalm , @paritshivani, |
Beta Was this translation helpful? Give feedback.
-
Hello @AmiableAnil ,
Sunbird Version - 4.10.0
I follow below link-
https://lern.sunbird.org/learn/product-and-developer-guide/user-and-org-service/apis/user-management
I am using user update API to update user organisation, In that I am trying v1/v2/v3 but getting not authorized error.
Request -
Request URL: https://host/api/user/v1/update
Request Method: PATCH
Status Code: 401 Not authorized
Payload-
"request": {
"organisationId": "0136188527577661441067",
"userId": "9a1ae74c-4035-4bf7-ab8c-7738231d8f50",
"roles": [
"CONTENT_CREATOR","PUBLIC"
],
"username": "shivchanneltest_mdjw"
}
Response -
{
"id": "api.user.update",
"ver": "v1",
"ts": "2023-10-06 06:22:17:793+0000",
"params": {
"resmsgid": "cdfb205f9cb646be2cfeab064ca3caa4",
"msgid": "cdfb205f9cb646be2cfeab064ca3caa4",
"err": "UOS_USRUPDUOS_0070",
"status": "FAILED",
"errmsg": "You are not authorized."
},
"responseCode": "UNAUTHORIZED",
"result": {}
}
I want to update the user organisation.
Please anyone can help me in this?
cc @komalm , @paritshivani , @Renuka-S
Beta Was this translation helpful? Give feedback.
All reactions