1

So, the default is that my logged user from the access token is whom has admin permissions but I don't know how to make any member an admin.

This is the body that I'm using from the documentation.

{
  "name": "Test Group",
  "welcomeMessage": "Welcome to group created programmatically",
  "members": [
    "{{mobile-number-3}}"
  ],
  "memberUserIds": [
    "{{loggedin-user-id}}"
  ],
  "groupType": "Group",
  "GroupPhoto": "",
  "BackgroundPhoto": "",
  "ShortDescriptionString": "Short description",
  "LongDescriptionString": "Long description"
}

2 Answers2

1

Even though there is no documentation of it, a simple PUT on endpoint https://{endpoint-url}/v1/groups/{group-id}/{member-id} with a JSON payload of { "role": "Admin" } works for me

st100
  • 126
  • 1
  • 4
0

You can also use the following API with JSON payload of { "role": "Admin" }.

{​​​​​​​{​​​​​​​endpoint-url}​​​​​​​}​​​​​​​/v1/groups/{​​​​​​​{​​​​​​​group-id}​​​​​​​}​​​​​​​/members/{{member-id}}

The "members" keyword is important here and it worked for me like this. Also, you can grant admin permissions only for group members. Otherwise, you will get an error from API.

newbie
  • 239
  • 1
  • 3
  • 15