Highlighted
Posted by
Digon

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.

1 Accepted Solution

Accepted Solutions
Highlighted
Posted by TeamViewer Star
TeamViewer Star
Solution

Re: Api Changing Groups Permissions

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
MCSD: App Builder
Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

View solution in original post

1 Reply
Highlighted
Posted by TeamViewer Star
TeamViewer Star
Solution

Re: Api Changing Groups Permissions

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
MCSD: App Builder
Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

View solution in original post