Can I Retrieve Particular Version of Messages with ChangeKey in Graph API? - outlook

Request : ​​https://graph.microsoft.com/v1.0/users/userid/mailFolders/inbox/messages
The Response contains a ChangeKey parameter, Which changes for every modification in messages.
Is there any way to get a particular version of Mailbox messages with ChangeKey using GraphAPI ?
Is there any other thing that we can do with the ChangeKey ?

Related

Is it possible to know the number of unread Slack messages a user has with the Slack API?

I'm building a messaging integration with Slack and a client. I need to show the badges on the corresponding conversations when the users logs in to the client to show the client how many unread messages it has.
I know that the channels.history method had the unreads parameter which would return as part of the response the amount of unread messages according to the user token, but that method is deprecated and my app is too new to use it.
I'm using the conversations.history now to retrieve the messages which is what slack suggest to use instead of the deprecated method channel.history, but this new method doesn't have that parameter and doesn't show any info regarding the amount of unread messages in the conversation.
As my app is a new one and not a classic one, I cannot use the RTM API.
I'm also subscribed to the message events so that I know when a new message was posted.
My issue is that I need to know how many new messages were sent to the user while he was not logged in.
Is there any way to get that info?
Unread count is in conversations.info method, not in conversations.history. There in unread_count and unread_count_display property in reponse. Documentation is here.

How to request botstate users on Microsoft Teams via Rest

If I send the Get request /v3/botstate/{channelId}/users/{userId} request to the emulator, it returns JSon. Nothing very useful of course since there aren't any real users in it. (doc referenced for the request https://docs.botframework.com/en-us/restapi/state/#/ and https://docs.botframework.com/en-us/csharp/builder/sdkreference/stateapi.html#getsetproperties)
If I send it to Teams, I get a 500 Server error. No additional information is returned with the error, it just repeats that there was a server error.
When I have gotten a 500 sending to Teams before, it was related to the JSon payload being sent. In this case, there is no payload.
The request is in response to a "message" my bot received, and I am passing along the channelId and from.id from that "message" as my parameters.
I am able to send Post "message" requests back, and the Get request /v3/conversations{conversationId}/members successfully, so my Bot seems to be setup correctly.
Anyone have any ideas?
There was a temporary issue with Teams this week. It has been fixed.
The ServiceUrl is not guaranteed to stay the same. It should be refreshed periodically. Please see: https://docs.botframework.com/en-us/csharp/builder/sdkreference/routing.html#connectorclient
NOTE: Even though ServiceUrl values may seem stable bots should not
rely on that and instead always use the ServiceUrl value
As of today, the Bot Framework is still in preview. The developers do their best to not commit breaking changes. The product is under continuous and active development. Thank you for your patience as the kinks are worked out.
Microsoft Teams does not currently support retrieving user information beyond the ID returned in the members call, or the information received as part of incoming payloads. We should have better support for this coming soon.

Can we pass custom values using square connect and have it returned back in webhook notification

I am looking for information on how to pass a custom variable (transaction_logID) to the square API and then have it returned back to me on the webhooks notification URL response.
How can i specifically link a "charge" event with a "notification" event so that I can update my personal SQL record with the transaction result? (Approved, Declined etc)
Thanks for your help.
Unfortunately passing in custom data and getting it back in a webhook isn't possible.
Depending on what exactly you want to link your notification to, you can look up the ID from the webhook in the v1 payments endpoints.

Clickatell - API access to billing log?

I need to be able to access a log of all SMS that were sent. Is there a way to do this via their HTTP API? I haven't had much luck finding anything that reference this in their docs.
There is a feature called 'callbacks' that can send an HTTP request to your server for every message you send. It will give you status updates about the message and the message charge. This allows you to build up whatever form of custom reporting that you may want.
https://www.clickatell.com/developers/api-docs/callback-(push-status-and-cost-notification)-advanced-message-send/
You send your message with the callback parameter... And you specify your URL to receive callbacks on your API connection on the website.
Unfortunately, you can't access reporting features like that via API. You need to log in to your central dashboard to get that information.
You can, however, query the message status if you have the message ID, but I don't think that's quite what you're looking for.
(Disclosure: I work for Clickatell)

Twilio: responding to incoming SMS message

After I send a sms message to a particular phone number, how do I track the potential conversation?
I see that there is the URL within my Twilio account that Twilio sends http requests to.
Do I just keep checking this URL and go through the messages from the user, using the "from" field in the JSON data?
Twilio developer evangelist here.
When someone responds to your Twilio number then that URL you set in your account will receive a POST or GET request (your choice) with all the details of the message. You don't need to check that URL, the information will come to you.
You could then use the REST API to gather the messages that have gone back and forth between your app by calling for all the messages sent to the user's number and all the messages received from the users number.
You can also, in response to an incoming SMS message, set cookies that can be retrieved as part of the HTTP request. So, if you want to save some data between messages that's a way to achieve that. Here's a guide on using cookies to track SMS conversations.

Resources