question

Nitesh Giri avatar image
Nitesh Giri asked Phong Vu commented

Getting permission issue in chats api

I have made an application which fetches the chats info to build an analytics on the no of messages send and received.

The user authorizing application has super admin permissions.

Steps:

But while fetching one chat's post I get this message:

{
    "errors": [
        {
            "errorCode": "CHT-012",
            "message": "The requester must be team member."
        }
    ]
}

Why am I getting this error ? Are there any limitations in a way that could restrict super admin to access all the endpoints(including chat posts) ?

rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Phong Vu commented

Unfortunately, we don't have an API for an admin user to read team messaging for analytics directly like that. That API is for team members to read from a team he/she belongs to.

You can try with the compliance exports API and control with timeFrom/timeTo and chat Ids to fetch chat data. This API lets a "compliance export" admin user to access any team/chat/conversation.

2 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Nitesh Giri avatar image Nitesh Giri commented ·

Thanks for the quick response @Phong Vu . To be more clear, I don't want to read the content of the messages but just want to know who sent whom at what time. We have no roles for this use case ?

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Nitesh Giri commented ·

Even you dan't read the content. The requirement is that you must be a member of that team. So the simple solution is to join the team and it will allow you to read from that team. Otherwise, you have to use the compliance exports API for now. I will discuss with the team to see if we can do something about this but I don't think it is possible for now.

1 Like 1 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys