Sinch logout message handling - sinch

while user login to his account Sinch send all the previous message of that user on login.received only new message and undelivered message ,not previous messages

As long as you dont delete any local databases and you login to the app using your security you should not recieve them. Sinch doesnt have a "logout" function.
If you uninstall its considered to be a new device and we deliver the messages to that device.
SO on logout when you delete files on your device make sure you just delete your files. (dont delete the sinch folder)

Related

Remove Running DM Welcome Message Bot in Twitter

i have installed(?) a welcome message bot in my twitter dm. yesterday i regenerate the api because i forgot where i saved them. now i can not delete or edit my current welcome message. i have deleted both the project and application also disconected the app from my account still the same.
when i use this with my new api from my new app from my new project
twurl authorize --consumer-key iFGe1xxxxxxxxxxxxxxxxxxxxx --consumer-secret 8ZsaMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
it says Authorization successful
but when i want to see message id
twurl -X GET "/1.1/direct_messages/welcome_messages/rules/list.json"
it says
{"errors":[{"code":89,"message":"Invalid or expired token."}]}
same with adding new message and upload media
i have emailed twitter about this, they reply is to report them to advertising. when im not using twitter for business, the link they sent itself said You do not have access to any advertiser account
is it possible to remove or reset the current welcome message? thanks

Slack event message.im not being triggered

I'm trying to get the event to be triggered when someone sends a message on a private conversation in slack, I've already registered the event subscription (message.im) in the subscribe to bot events section, made sure that the needed scope was added (im:history), and reinstalled the app on my workspace.
Also tried signing out of the workspace and logging in again.
Yet, even if it is the admin sending a message to a user or a user sending a message to the admin (or in any other case with other users) the Event is not being triggered.
Any help or suggestion of why could this be happening?
Thanks!
You receive this event when a user sends a direct message to your bot/app.
You wouldn't receive this event when a user sends a message to another user, because the bot is not a part of that conversation.

Slack Events API not working for normal users

I'm using slack api to send reply whenever there is any direct message to authenticated user. So I created app, enabled events api and verified webhook url and subscribed to messages.im event
I use regular oauth flow with scope(chat:write:user,users:read) to get the access token.
First I tried with the admin of the workspace and everything worked fine. Whenever there is a direct message between admin user and any other user, i'm receiving events to my callback.
NOW
when I tried same with normal user(user2) i'm not receiving any events back when there is direct message between user2 and some other user. I followed the same steps above.
User2 went through same oauth flow with same scopes and got the access token of his own. As I subscribed to events api, I should be able to received event callbacks to the url I mentioned.
Is there any issue here? Is this not how things work?
This is not supposed to work.
Your Slack app will only receive message events from channels / conversations, which the installing user is a member of (e.g. the admin is member of the direct messaging conversation between him and others). But it's not possible to get direct messages between other users.
This is how Slack's security architecture is designed. In general it is not possible for any Slack app to monitor all private and direct messaging channel, even if the installing use is an admin / owner.
A common workaround for private channels is to retrieve messages for a bot user and make sure that bot user is a member of all private channels you need to monitor. However, this workaround is not very practical for direct message conversations.
Turns out it is an issue with scopes, following is the message I received from slack support team, they are awesome.
Hi Sasikanth,
Thanks for getting back to me. I took a look and it seems that there was some change with the scopes requested when user2 installed the "My App Name" app.
Here are the scopes that each of these users received upon installing the "My App Name":
user1: im:history,users:read,chat:write:user
user2: users:read,chat:write:user
You'll notice that user 1 above has the im:history scope, whereas user 2 above does not. It's mentioned on the doc for the message.im event type (https://api.slack.com/events/message.im) that the im:history scope is needed.
That's the reason why you're not receiving the message.im event type for DMs sent to user 2.
I hope that helps to explain the issue. What you'll need to do is remove the authorization for user2 from: (my dev app url) and have that user reinstall the app with the appropriate scopes.

Regarding uable to trigger Paypal REST API webhook events from developer sandbox

What is wrong with my Paypal sandbox account process
to receive webhook notifications? We are unable to receive webhook event on
my URL.
URL working with "Webhooks simulator". Please let me know what
should I do for receive webhook event on above URL.
Webhooks simulator sends sample payloads for the events you configured. It does not send a notification on triggering of an actual event.
If you are getting notification via Webhooks Simulator, it means the URL configured by you is able to intercept POST requests.
Now for the "Paypal sandbox account unable to process to receive Webhook notifications" part, please check if the transaction is actually created at https://developer.paypal.com/developer/dashboard/sandbox/ . If the transaction you are looking for is not present there, there won't be any notification generated. In case transaction is present there and still you are not getting any notifications, please share debug id.
Here is a silly thing that I overlooked in the documentation and only found out after contacting support.
After you've followed the approval url and gave your approval, dit you execute the payment with the REST API?
https://developer.paypal.com/docs/api/payments/#payment_execute
Webhooks are only called after you've executed the payment.
The confusing part is; there is no webhook being called, when a user approves or cancels a payment. There is only a redirect back to a return url or cancel url. So you either need to monitor the redirect back to your site and trigger the execute call then, or find another way (like polling the payment) to see the status change before calling the execute call.

sinch sending old deleted messages in onMessageSent

Why is sinch sending old deleted messages in onMessageSent of MessageClientListener? These messages were deleted in my Parse backend. I've deleted data of the app on phone, so sinch should n't have this locally. From where is Sinch bringing in all these messages and what should I do to avoid this?
hi sinch evangelist here.
I am going to try and explain this. Parse and Sinch has nothing to do with each other (we have a tutorial where we show how you can save messages to your own backend like parse) So the fact that you delete from parse has nothing to do with Sinch.
Regarding delivery of messages, we keep all messages for delivery to all devices a user might have for 30 days.
So if you i.e install your app on a new device and login we will ship those messages to that device. And we consider this to be a feature :D
I can agree with you that it might be confusing sometimes, since if you uninstall and app you will get all messages again.
I can see a couple of workarounds for this delete of app and deletions of messages.
You could either mark messages as deleted in parse and not display to the user, or look at timestamps.

Resources