Error Response When Updating User Consent for Private Program #135
-
Hi, We encountered an error while attempting to update the user consent for a private program. The error message indicates an "invalid organisationid" error. The Details: Request: {
"request": {
"consent": {
"userId": "52907735-7316-4d8d-886d-af46a8830549",
"objectType": "Program",
"consumerId": "0126796199493140480",
"objectId": "649a91b6e959de0008d3f28a",
"status": "REVOKED"
}
}
} Response: {
"id": "api.user.consent.update",
"ver": "v1",
"ts": "2023-06-29 08:02:23:881+0000",
"params": {
"resmsgid": "553fee8603028324108ae9b7215cebe9",
"msgid": "553fee8603028324108ae9b7215cebe9",
"err": "UOS_UCNSNTUPD0019",
"status": "FAILED",
"errmsg": "Please provide valid organisationid."
},
"responseCode": "CLIENT_ERROR",
"result": {}
} Additional Notes:
{
"id": ".private.user.v1.read.52907735-7316-4d8d-886d-af46a8830549",
"ver": "private",
"ts": "2023-06-30 10:32:03:785+0000",
"params": {
"resmsgid": "72ff8add-2a13-40b9-9d03-7da22cc33d44",
"msgid": "72ff8add-2a13-40b9-9d03-7da22cc33d44",
"err": null,
"status": "SUCCESS",
"errmsg": null
},
"responseCode": "OK",
"result": {
"response": {
"webPages": null,
"maskedPhone": null,
"tcStatus": null,
"loginId": null,
"subject": null,
"channel": "dikshapreprodcustodian",
"profileUserTypes": [
{
"type": "administrator",
"subType": "hm"
},
{
"type": "administrator",
"subType": "deo"
}
],
"language": null,
"updatedDate": "2023-06-29 08:14:39:438+0000",
"password": null,
"managedBy": null,
"flagsValue": 0,
"id": "52907735-7316-4d8d-886d-af46a8830549",
"recoveryEmail": "",
"identifier": "52907735-7316-4d8d-886d-af46a8830549",
"thumbnail": null,
"profileVisibility": null,
"updatedBy": "52907735-7316-4d8d-886d-af46a8830549",
"accesscode": null,
"locationIds": [
"aecac7ab-15e4-45c9-ac7b-d716444cd652",
"f6d40b8a-3ba0-4e3b-b7f5-2586b69122f6",
"bc75cc99-9205-463e-a722-5326857838f8"
],
"registryId": null,
"rootOrgId": "0126796199493140480",
"prevUsedEmail": "",
"firstName": "ft1",
"isMinor": false,
"profileLocation": [
{
"id": "aecac7ab-15e4-45c9-ac7b-d716444cd652",
"type": "district"
},
{
"id": "f6d40b8a-3ba0-4e3b-b7f5-2586b69122f6",
"type": "block"
},
{
"id": "bc75cc99-9205-463e-a722-5326857838f8",
"type": "state"
}
],
"tncAcceptedOn": 1687442512347,
"allTncAccepted": {},
"profileDetails": null,
"phone": "",
"dob": "1995-12-31",
"grade": null,
"currentLoginTime": null,
"userType": "administrator",
"status": 1,
"lastName": "",
"tncLatestVersion": "v13",
"gender": null,
"prevUsedPhone": "",
"stateValidated": false,
"encEmail": "+rhvtjcF544HE+06wQA4aZk4GhpEwDJTc5sZ8pFulQ6pjx0yn+KMiA/V3/FhmjFeHcknjYrbjl/t\n4T4uT+ggXBkcKFmHNJSYA/DkqkLflSrQJTt9KYXrt2O6UV2EQ7XDT6a+wzaAmCWueMEdPmZuRg==",
"isDeleted": false,
"organisations": [
{
"isSelfDeclaration": true,
"organisationId": "0126796199493140480",
"updatedBy": null,
"addedByName": null,
"addedBy": null,
"associationType": 2,
"approvedBy": null,
"updatedDate": null,
"userId": "52907735-7316-4d8d-886d-af46a8830549",
"approvaldate": null,
"isSystemUpload": false,
"isDeleted": false,
"hashTagId": "0126796199493140480",
"isSSO": false,
"isRejected": null,
"id": "013823529419833344438",
"position": null,
"isApproved": null,
"orgjoindate": "2023-06-22 14:01:46:541+0000",
"orgLeftDate": null
},
{
"isSelfDeclaration": true,
"organisationId": "01274200880331980816484",
"updatedBy": "52907735-7316-4d8d-886d-af46a8830549",
"addedByName": null,
"addedBy": "52907735-7316-4d8d-886d-af46a8830549",
"associationType": 2,
"approvedBy": null,
"updatedDate": "2023-06-29 08:14:39:447+0000",
"userId": "52907735-7316-4d8d-886d-af46a8830549",
"approvaldate": null,
"isSystemUpload": false,
"isDeleted": false,
"hashTagId": "01274200880331980816484",
"isSSO": false,
"isRejected": false,
"id": "01274200880331980816484",
"position": null,
"isApproved": false,
"orgjoindate": "2023-06-29 05:37:07:960+0000",
"orgLeftDate": null
}
],
"provider": null,
"countryCode": null,
"tncLatestVersionUrl": "https://obj.stage.sunbirded.org/privacy-policy/terms-of-use.html",
"maskedEmail": "ft*@yopmail.com",
"tempPassword": null,
"email": "ft*@yopmail.com",
"rootOrg": {
"dateTime": null,
"preferredLanguage": null,
"keys": {},
"organisationSubType": null,
"channel": "dikshapreprodcustodian",
"approvedBy": null,
"description": "Pre-prod Custodian Organization",
"updatedDate": "2022-02-18 09:50:42:752+0000",
"organisationType": 5,
"addressId": null,
"orgType": null,
"isTenant": true,
"provider": null,
"locationId": null,
"orgCode": null,
"theme": null,
"id": "0126796199493140480",
"communityId": null,
"isApproved": null,
"isBoard": true,
"email": null,
"slug": "dikshapreprodcustodian",
"isSSOEnabled": null,
"thumbnail": null,
"orgName": "Staging Custodian Organization",
"updatedBy": null,
"locationIds": [
"027f81d8-0a2c-4fc6-96ac-59fe4cea3abf",
"8250d58d-f1a2-4397-bfd3-b2e688ba7141"
],
"externalId": "101010",
"orgLocation": [
{
"type": "state",
"id": "027f81d8-0a2c-4fc6-96ac-59fe4cea3abf"
},
{
"type": "district",
"id": "8250d58d-f1a2-4397-bfd3-b2e688ba7141"
}
],
"isRootOrg": true,
"rootOrgId": "0126796199493140480",
"imgUrl": null,
"approvedDate": null,
"homeUrl": null,
"orgTypeId": null,
"isDefault": null,
"createdDate": "2019-01-18 09:48:13:428+0000",
"createdBy": "system",
"parentOrgId": null,
"hashTagId": "0126796199493140480",
"noOfMembers": null,
"status": 1
},
"phoneVerified": true,
"profileSummary": null,
"tcUpdatedDate": null,
"recoveryPhone": "",
"avatar": null,
"userName": "ft1_3iib",
"userId": "52907735-7316-4d8d-886d-af46a8830549",
"userSubType": "hm",
"promptTnC": false,
"emailVerified": true,
"lastLoginTime": null,
"createdDate": "2023-06-22 14:01:46:522+0000",
"framework": {
"board": [
"CBSE"
],
"id": [
"ekstep_ncert_k-12"
]
},
"createdBy": null,
"profileUserType": {
"subType": "hm",
"type": "administrator"
},
"encPhone": null,
"location": null,
"tncAcceptedVersion": "v13"
}
}
} consent API cURL curl --location 'https://staging.sunbirded.org/api/user/v1/consent/update' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Im1v****************d4cyG6nVjJAYXOMnmqpr868pUKVDP7QqKA3y73Ag9ERUxuzMipTxm8s' \
--header 'x-authenticated-user-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFjY2Vzc3YxX2tleTMifQ.eyJhdWQiOiJodHRwczovL3N0YWdpbmcuc3VuYmlyZGVkLm9yZy9hdXRoL3JlYWxtcy9zdW5iaXJkIiwic3ViIjoiZjo5Nzk3MzhiNy0yNTNjLTRhZGYtOTY3My1hODU3ZWViODYxMTU6NTZlMDZkZjQtNTA4OC00MTFhLWFkZjAtZTMzZDZkMDU4NDNiIiwicm9sZXMiOlt7InJvbGUiOiJQVUJMSUMiLCJzY29wZSI6W119XSwiaXNzIjoiaHR0cHM6Ly9zdGFnaW5nLnN1bmJpcmRlZC5vcmcvYXV0aC9yZWFsbXMvc3VuYmlyZCIsInR5cCI6IkJlYXJlciIsImV4cCI6MTY4ODIwMjI2MywiaWF0IjoxNjg4MTE1ODYzfQ.mvtxZSM1_a-UnmLCov7M2kRzsYD4KSF9910vXNyj3Q5P1bGXXn2jqK--AWJrB6QK1CKIdtWKIys3bYc7x1mPxEG97Nq_zA-7G7cUWWgHwROjmNwxXm9iTvPGGNh6R4G5TsgnnMYlAmahaapnxVhlzSZMFTkcHSOJ0mPE3L6a4WBGQa667nCxdbh4GA2A4HJNvPnHxRwJ4Ek5rIVFlurwoNEEqqNnDOlhpitZnBKLmwa0FEj8g7P6rKJ5CueJsdyk9mzLXEwT27E8MTyOfHRXa8RH5pTocs6L_2nBbZKHJLf0wH_uYd2oHEm0JI1nV6p5x3azjD0_CjX1PB-ZRss1b' \
--header 'Content-Type: application/json' \
--data '{
"request": {
"consent": {
"userId": "56e06df4-5088-411a-adf0-e33d6d05843b",
"objectType": "Program",
"consumerId": "012679619949314
0480",
"objectId": "649e9b1ce959de0008d42504",
"status": "REVOKED"
}
}
}' Please note that the bearer token ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@VISHNUDAS-tunerlabs in the above curl |
Beta Was this translation helpful? Give feedback.
@VISHNUDAS-tunerlabs The orgId
0126796199493140480
you are providing is a custodian/default org. There are no use of giving the consent to the custodian org. Consent to be given to the org for which admin can see the PII or consent detail. So please pass a proper tenant org id which is not a custodian org id.