Twilio Programmable Chat - Access denied (code: 54007) for old chats - sdk

We are using Twilio Programmable Chat on our project for 1 year. On the mobile side we use twilio-chat v.6.0.0 SDK. On the backend side we use java library - com.twilio.sdk:twilio:7.51.0
Problem
But a couple of days ago we started experiencing problems with authorization on the mobile side. Everything is ok when we create new chats and work with them.
But when we try to fetch messages for the old chats (created before that problems), we receive the following error access forbidden for identity (status: 403, code: 54007)
What we tried
We tried to upgrade/downgrade both mobile SDK and backend libraries.
I've read the code: 54007 documentation. We have never configured any Sync services, possible they were introduced and not properly configured for the old chats?
We have only one Sync service that was created (automatically) recently and ACL enabled flag is set to false.
Here is the structure of our access token:
My guess is that something has recently been changed with the permissions in the Chat API and the default config is not working for us.
I don't know exactly what it could be. Please, help.

In our case we got the same error when trying to fetch messages for a channel where the user is not a member of Error: Access forbidden for identity (status: 403, code: 54007). This happened with Twilio SDK twilio-chat 6.0.0 and 4.1.0.
After we reviewed the "Roles and Permissions" section in the Twilio Console we noticed that the "service user" (which is the default user role for the chat user) did not have the permission "editChannelAttributes" activated, as compared to another sub account where fetching messages for unjoined channels was still possible.
Activating the permission "editChannelAttributes" for the service user and fetching messages seems to work again.
I'm not sure what the connection between this permission and fetching messages could be, but maybe this information is still helpful.

This is the official answer from Twillio Support that helped us:
Recently the engineering team has effectively deployed some modifications over Programmable Chat; before this change, users would be able to see channel messages that they were not part of. With this update, users will receive error code 54007 for Chat if they try to read any channel that they are not a member of.

Related

Missing Permissions for Microsoft Graph Add Chat message

I am trying to use Microsoft.Graph to send add a message to a chat. I have successfully found my team and created a channel for the messages to go into but when I try to actually send the message, I get a Forbidden error message. This is covered by the ticket:
Microsoft Graph API for Teams: Send Channel/ Chat messages and I am getting the same problem that #Koelier originaly got.
The reason that this is not fixed is that following the answer does not fix my problem. Indeed, the ChannelMessage.ReadWrite.All does not appear in my list. I am looking for the app to run as a service, in the background so the Application Permissions is the method I need to use.
I note that I am not alone in this as #johnnycardy notes that he has had exactly the same problem as me. Furthermore, I linked to the document referenced by #nastassiar and it did not reference the ChannelMessage.ReadWrite.All at all. I can assume it did once but not anymore.
Any guidance would be gratefully received.
Just checked the permissions to perform the same using graph explorer and the below are the ones that I had to add.
ChannelMessage.Send - Allows the app to send channel messages in Microsoft Teams, on your behalf.
Chat.ReadWrite - Allows an app to read and write your 1 on 1 or group chat messages in Microsoft Teams, on your behalf.
ChatMessage.Send - Allows an app to send one-to-one and group chat messages in Microsoft Teams, on your behalf.
Group.ReadWrite.All - Allows the app to create groups and read all group properties and memberships on your behalf. Additionally allows the app to manage your groups and to update group content for groups you are a member of.
enter image description here

I have integrated twilio otp api and it suddenly stop working

I have integrated twilio and it was working fine but suddenly
end users stop receiving top message at their mobile. Is there any capacity problem if yes then how to fix this
Without providing the code, I can give the following suggestions to check upon.
1. Check if the Twilio Account has enough balance to send messages
you can check this in the dashboard.
2. Check if the Message template used is verified or not.
If the template is rejected for some reason, you won't be able to use it.
3. Use the API Gateway Dashboard to determine the cause for no sending messages.
If you can see the messaged being in outbounds mode, but not being sent, you can check the reason for it.
4. Check if the Twilio API library used has changed the API structure
Refer to Twilio Docs and confirm if the APIs have received some changes in them, deprecating any changes. (This is very rare, as most API Providers keep the Legacy API code format active for some time for users to migrate from it.)
5. Confirm If any New Government Rules are changed.
Ex. In India, there are some new laws put up for sending SMSes to users. You would need to follow the rules to register the template again to a Mobile Carrier's site, and then use it. These details will be provided on Twilio Dashboard.

Accessing and creating Teams Chats via Graph API

I'm going over the Microsoft Teams section of the Graph API and trying to find out how to do two things:
Create a new chat, giving it a topic that correlates to an entity in our app (essentially creating a chat around an entity), invite specific users into it, and send messages to the chat.
Access the currently logged-in user's private chats, filtered by their topic, and show their contents inside our app.
For #2, it looks like it should be possible using beta endpoint of the Graph API, but I get 403 Forbidden errors both in the Graph Explorer when trying to access https://graph.microsoft.com/beta/me/chats, and in my own app, after enabling the Chat.Read permissons for it.
For #1, it looks like the API doesn't officially support creating new chats at all.
Is there any approach we can use to create and manage chats? Is there an alternative, perhaps not MicrosoftGraph-based API?
as you mention, the ms graph doesn't yet support initiating group chat. You would use the MS Bot Framework for this: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bot-conversations/bots-conv-proactive
I see the docs on these Chat api do exist, but they are not present in the Graph Explorer. I tired testing them in the OfficeApiEditor tool with a v2.0 App Registration and Delegated permissions (Chat.Read) and i get this:
Failure - Status Code 500
"code": "InternalServerError",
"message": "Error while processing response.",
so maybe it will take some time before they are really available in beta.
In MS teams, there is a api called ChatMessage to post a message to a chat(only if the chat already exist or started). But, there is no api to create/start a new chat. I have raised a feature request. Do vote for this to suggest this idea to Microsoft.
https://microsoftteams.uservoice.com/forums/913786-microsoft-teams-free/suggestions/38776681-it-would-be-awesome-l-if-there-is-an-api-functiona

MS Graph API Teams: Application access to Channel Messages

I am looking at Teams Channel Create Chat Message method (currently only available in beta).
We have an application which manages groups of users and would like to integrate with MS Teams - create a Team, add Channels and send messages to the channel - all without a user. For this I have followed "Get access without a user".
However I notice that for this and other message level functions (list messages) Application permission is "Not Supported" and for our use case Delegated permissions is not really an option (similar to this).
Does anyone know why these are only available for Delegated Permission? is there a plan to enable this or is will this always not be "Not supported" for Application Access?
I appreciate that giving an Application full access to all messages may be something that Admins would not be keen on, but being able to post and retrieve messages from channels the application has created seems (to me) to be reasonable (perhaps the permissions model isn't that fine grained yet).
This is possibly an overlap of Unable to “List channel messages” on Azure AD Graph API Beta - the OPs answer contains an unanswered similar question.
We aren't currently sharing road map externally of when these types of things are being updated.
What we do ask is that you request these on our UserVoice channel so that we can track the demand and prioritize accordingly. If you can go here and add this request I'd appreciate this and I'll let the PM who owns this know https://developer.microsoft.com/en-us/graph/support

MyAsana Error Unexcepted to connect

I use API Asana in "MyAsana" to follow my Workspace (Project) in Asana.
The API is used in 10 smartphones from different people to follow the task of projects.
After 2 days, the API does not respond. All applications authorized in Asana do not respond.
I reset the API & it works in MyAsana. and today the same problem.
I have to do a reset and change the API in all phones.
Error is: UNEXEPTED ERROR WHILE CONNECTING WITH ASANA.THIS IS MOST LIKELY A PROBLEM WITH ASANA SERVER. Please try again later.
How can I fix this please?
Asana is currently having some problems with its service and has had to temporarily shut down access to the API while it addresses them. Follow #asana on twitter and you should get a tweet when access is restored.

Resources