Get Channel pre-engagement data in Twilio Flex Plugin - twilio

I'm new to Twilio and trying to get pre-engagement data which is stored in Flex Channel inside an Twilio Flex Plugin.
All i'm currently get is the reservation, which has the channel sid.
Is there an easy way to get the corresponding channel object?
I already tried to fetch the corresponding Information via the Conversations API but this doesnt worked in the way i expected.
I also tried to add the Attributes via Twilio Studio to the Task, but i don't get how to get the enganement data.

Related

How to update (edit) a Microsoft Teams message (thread or reply) inside a Teams channel via REST API

I can write a thread message inside a channel in Microsoft Teams.
Is there any method to update the content of it via REST API?
Thanks
Simply No, Neither Update method nor Delete method
Two things which is available in Graph API, one is Post method and second is Get method. This is for messages inside a channel in Microsoft Teams.
Get channel message,
GET /teams/{id}/channels/{id}/messages/{id}
Documentation: Get channel message
GitHub: channel-get-message.md
Create chatMessage in a channel
POST /teams/{id}/channels/{id}/messages
Documentation: Create chatMessage in a channel
GitHub: channel-post-messages.md
If you want to update channel or calendar event then the API available for them.
Patch channel PATCH /teams/{id}/channels/{id}
Update event
Some of these APIs are in Beta version, therefore,
APIs under the /beta version in Microsoft Graph are subject to change.
Use of these APIs in production applications is not supported.
Idea posted on Microsoft User Voice, Update Teams Message/Channel Posts with Graph API.
The User Voice idea in Utkarsh's answer is gone.
I have created a new item in the feedback portal, as I couldn't find an existing item.
https://feedbackportal.microsoft.com/feedback/idea/1b2f43ee-a56f-ed11-a81b-000d3ae32cd0

get recordingSid in Twilio Studio Flow

I've created a flow in Twilio Studio, which I access via the Studio REST API. This flow makes a phone call and serves as a simple IVR. I would like to provide access to the recording of this call to my end users.
I would like to get the recordingSid returned to my application.
Is this possible? I see references to RecordingStatusCallback being passed as a parameter to the non-Studio REST API, but it appears that there is no support for this in the Studio REST API.
I think I can grab the CallSid from widget data and then show the list of recordings for that Call, but this isn't a seamless as being able to provide my users with a direct link to the recording.
Happy for any guidance.
Thanks!

Sending direct message to a bot in slack and get the response

I am trying to figure out how to send a direct message to a bot in slack using the Slack API and get the response by the bot. For example, I use chat.postMessage:
curl -X POST -d
'token=xoxp-xxxx-xxxxxxxxx-xxxx&channel=BOT_ID&text=where?&as_user=true'
https://slack.com/api/chat.postMessage
The bot respond with:
I'm at hubot-server1.localI'm at hubot-server2.local
I want to capture the response. What Slack API I can use to capture? chat.postMessage doesn't return it.
Thanks for any reply.
Regards...
There are no API methods that will directly return a response from a bot. To capture responses of bots (and users) you need to read the messages from a channel.
With the Web API you can do that by calling channels.history for public channels (or groups.history private channels and similar names methods for other conversation types. you can also use the new conversations.history method to access all types of channels).
Those methods will give you all messages of a channel and you will need to filter out the right message within your app.
You can also get all new messages for a channel with the RTM API and the Events API.

How to initiate a Direct Message (Private IM) using the Slack API

Using the Slack API (webhooks, RTM, Web, doesn't matter) is it possible to initiate a DM/Private channel with a user where the private IM channel doesn't already exist?
I am aware of the API call https://api.slack.com/methods/im.list which will show me the private IM channels that are already open, however this is an empty list for the bot as no real user will have DM'd the bot.
Basically, we have a list of users who need to be notified of something privately by a bot, and those users will not likely have DM'd the bot before, so the private channel will not yet exist. How can we create that channel using the API?
Well, the fool that I am just needed to RTFM.
https://api.slack.com/methods/im.open
This method opens a direct message channel with another member of your Slack team.
Arguments
This method has the URL https://slack.com/api/im.open and follows the Slack Web API calling conventions.

YouTube Analytics API Questions

I'm new to the YouTube Analytics API, and had a couple of questions:
In order to retrieve Analytics reports, I have to specify the channel ID for the "ids" parameter. How do I find the channel ID for the OAuth-authenticated user? I saw in the Sample Application that I can call Channels.list method in the Data API (V3) and use the "mine=true" parameter. Is this guaranteed to return a single channel? If not, how do I know which channel is the right one? What's the recommended way of finding a user's channel ID?
Once I have the channel ID, I can begin querying for Analytics data. I'd like to query the "views" metric for the channel for the entire history of that channel. The question is, how do I know how far back to query? Is there a channel start date? The Channels.list method mentioned above doesn't return the snippet.publishedAt date for my channel so that doesn't seem to be a reliable way. How else do I know when to stop? I guess I could query back until 2005 or so when YouTube was founded but that seems like a bad approach. Any suggestions?
The Analytics API supports reports for channels as well as content owners. Once a user authenticates via OAuth, how do I know if that account is a regular YouTube account vs a CMS content owner account?
Any help would be greatly appreciated!
The recommended approach is to do a channels.list(mine=true). The first result returned will be the channel corresponding to the currently authorized user. (channels.list() returns a list of channels because there are other combinations of request parameters that could result in more than one channel being returned.)
Going back to some arbitrary date in the past should be harmless. 2005, 2000, etc. The YouTube Analytics backend should know how to properly deal with that, and you'll obviously only get stats that date back to the first views associated with your channel.
The value of the ids= parameter tells the API whether you want to do a report against a channel associated with the current authorized user (ids=channel==UC...) or against channels/videos that you have access to as a CMS content owner (ids=contentOwner==CONTENT_OWNER_NAME).

Resources