Api Changing Groups Permissions
Hi,
i try to change the permission of a group in order to share it ith my colleague.
I write this but i receive this error {"error":"invalid_request","error_description":"Invalid property identifier character: {. Path 'users[0]', line 3, position 2. Invalid property identifier character: {. Path 'users[0]', line 3, position 2. Invalid property identifier character: {. Path 'users[0]', line 3, position 2.","error_code":1}
I write this in the parameters "{\n\t\"users\": [ {\n\t{\"userid\": \"u58939178\",\n\t\"permissions\": \"readwrite\"}]\n}"
Best Regards
Alberto C.
Best Answer
-
Hi @AlbertoC
you are certainly invoking the POST /api/v1/groups/<gID>/share_group method, but from the escape sequence you entered it is difficult to determine the value you are passing.
Can you use Fiddler, or other tool to control HTTP and HTTPS traffic, and check if you're actually passing a json array as specified by TeamViewer?
POST
/api/v1/groups/g425123356/share_group
Content-Type: application/json
{ "users" : [
{ "userid" : "u12345678",
"permissions" : "read" },
{ "userid" : "u87654321",
"permissions" : "readwrite" }]
}Regards
Domenico Langone
5
Answers
-
Hi @AlbertoC
you are certainly invoking the POST /api/v1/groups/<gID>/share_group method, but from the escape sequence you entered it is difficult to determine the value you are passing.
Can you use Fiddler, or other tool to control HTTP and HTTPS traffic, and check if you're actually passing a json array as specified by TeamViewer?
POST
/api/v1/groups/g425123356/share_group
Content-Type: application/json
{ "users" : [
{ "userid" : "u12345678",
"permissions" : "read" },
{ "userid" : "u87654321",
"permissions" : "readwrite" }]
}Regards
Domenico Langone
5