Getting Invalid sender action data when trying to mark_seen instagram direct message - instagram

{{
"recipient": {
"id": "5144867005573717"
},
"sender_action": "mark_seen"
}}
Api Response:
{{
"error": {
"message": "(#100) Invalid sender action data",
"type": "OAuthException",
"code": 100,
"error_subcode": 2534019,
"fbtrace_id": "Aq5V2HVmpQRbs1uBrxvq6_D"
}
}}
The same method works for messenger, it works good for sending text media messages but for sender actions it doesn't work
Does messenger api sender actions supports instgram messeging as well?

Related

Customized html message in microsoft azure guest invitation

This is the request body I am using to send email to the guests. However, I want to customize the customizedMessageBody using html tags and elements.
{
"invitedUserDisplayName": "Invited User",
"invitedUserEmailAddress": "invited1234#yopmail.com",
"invitedUserMessageInfo": {
"messageLanguage": "string",
"ccRecipients": [
{
"emailAddress": {
"name": "xyz#yopmail.com",
"address": "xyz#yopmail.com"
}
}
],
"customizedMessageBody": "<html>hello tiger</html>"
},
"sendInvitationMessage": true,
"inviteRedirectUrl": "https://myapps.microsoft.com"
}
As Message itself a text area. Due to the Security reason, Customizing the customizedMessageBody using html tags and elements will not be processable.
This document details the available options you have for invitation messages

Reply to message as threaded response in MS Teams using Azure Bot Sevices

I have been referring to docs like this and this to send a reply to a proactive message as threaded message.
But, I am only able to send each message as independent message and not as reply message.
I want to have a reply like this:
I am pretty sure the channel allows reply, since the screenshot is from the channel itself.
My request payload :
URL:https://smba.trafficmanager.net/amer/v3/conversations/{conversationId}/activities/{activityId}
Method: POST
{
"type": "message",
"from": {
"id": "bot-id",
"name": "bot name"
},
"conversation": {
"id": "19:channelId",
"name":"random name"
},
"recipient": {
"id": "recepientId",
"name": "name"
},
"text":"I want to reply to threadid",
"replyToId":"{activityId}"
}
This is supposed to be very simple, but I am struggling to find what I am doing wrong. Any help is appreciated.
I used the URL Like this:
https://smba.trafficmanager.net/amer/v3/conversations/{channelId;messageid={activityId}/activities
and it worked like a charm!

How to fix HTTP-Status 401 (Unauthorized) on bot-connector when calling the facebook-messenger webhook?

After setting up a bot-connector (SAP Conversational AI: https://github.com/SAPConversationalAI/bot-connector), creating a channel for the fb-messenger and configuring a webhook in the fb-app i constantly get http-status 401 (unauthorized) in my bot-connector log when sending a message from my fb-messenger.
Here is what i've done so far: (i fallowed this guide: https://github.com/SAPConversationalAI/bot-connector/wiki/Channel---Messenger)
deployed bot-connector to google cloud as app engine service to get the [bot-connector url]
created bot-connector:
POST on [bot-connector url]/v1/connectors with body:
{"url":[bot-connector endpoint url]}
POST-response:
{
"results": {
"id": [connector id],
"url": [bot-connector endpoint url],
"isTyping": true,
"conversations": [],
"channels": []
},
"message": "Connector successfully created"
}
created channel for fb-messenger:
POST on [bot-connector url]/v1/connectors/[connector id]/channels with body:
{
"slug":"channel-messenger-srtbot-dev",
"type":"messenger",
"token":[fb-app secret],
"apiKey":[fb-app api-key],
"isActivated":true
}
POST response:
{
"results": {
"id": [connector id],
"updatedAt": "2019-01-22T15:03:29.569Z",
"createdAt": "2019-01-22T15:03:29.569Z",
"webhook": "/v1/webhook/[channel id]",
"slug": [name of my channel],
"type": "messenger",
"token": [fb-app secret],
"apiKey": [fb-app api-key],
"connector": [connector id],
"locales": [],
"openingType": "never",
"hasGetStarted": false,
"forwardConversationStart": false,
"isActivated": true,
"isErrored": false,
"webhookToken": [fb webhook token]
},
"message": "Channel successfully created"
}
configured fb-messenger-webhook: (after completing the config i get the http-status 200 in the bot-connector log)
callback-url: [bot-connector url]/v1/webhook/[channel id]
token: [fb webhook token]
subscribed webhook to my fb-page
sent a message in my fb-messenger
Expected results:
after i send a message in the fb-messenger:
http-status 200 in the bot-connector log
messages gets forwarded to [bot-connector endpoint url]
bot responds to the message (i get an answer in the fb-messenger)
Actual results:
after i send a messag in the fb-messenger:
http-status 401 (unauthorized) in the bot-connector log (approximately every 60 seconds after the first fb-messenger message)
nothing else happens
i get no answer in the fb-messenger
When creating the channel, the app secret should be passed as the apiKey attribute and the page token as the token attribute. When the channel is created, it will have a webhookToken attribute. This should be used as the verify token when setting up the webhook on Facebook.
So instead what you should be passing to create the channel, should look like this:
{
"slug":"channel-messenger-srtbot-dev",
"type":"messenger",
"token":[fb-page token],
"apiKey":[fb-app secret],
"isActivated":true
}

Passing resend_envelope=true to putEvelopeRecipients return success but not resend

In Postman putEnvelopeRecipients call returns success AND resends the envelope.
When I do the same thing in my C# program I get the identical success text but the envelope is not resent.
I realize my c# code should be presumed guilty, but I'm confused because of the successful response (below).
PUT https://demo.docusign.net/restapi/v2/accounts/<act>/envelopes/<env>/recipients/resend_envelope=true
With a body from a GET /recipients call.
Successful result:
{
"recipientUpdateResults": [
{
"recipientId": "1",
"errorDetails": {
"errorCode": "SUCCESS",
"message": ""
}
},
{
"recipientId": "2",
"errorDetails": {
"errorCode": "SUCCESS",
"message": ""
}
}
]
}
The recipient will only receive the email
If the envelope status is Sent
The Envelope has reached the recipients Routing order
If the envelope is in a Created status then the PutRecipients call will succeed, but no email will be sent.

I'm sending an Api.ai carousel message to Smooch.io but it ends up being rendered as text

I have explored smooch.io. the format of sending rich messages to smooch.io is as follows:
{
"role": "appMaker",
"type": "carousel",
"items": [{
"title": "Tacos",
"description": "Description",
"mediaUrl": "http://example.org/image.jpg",
"actions": [{
"text": "Select",
"type": "postback",
"payload": "TACOS"
}, {
"text": "More info",
"type": "link",
"uri": "http://example.org"
}]
}, {
"title": "Ramen",
"description": "Description",
"mediaUrl": "http://example.org/image.jpg",
"actions": [{
"text": "Select",
"type": "postback",
"payload": "RAMEN"
}, {
"text": "More info",
"type": "link",
"uri": "http://example.org"
}]
}]
}
BUT when i send this JSON response through api.ai to smooch.io , it gets error. Though it easily displays simple text message.
How can i send this json message as an object to smooch. Is there any way to send it like the Facebook object?
All i want is to send a carousel to the user.
The Smooch API defines its own carousel JSON structure:
http://docs.smooch.io/rest/#carousel-message
The advantage of this is that Smooch can adapt this generic carousel format into any channel that support rendering them (Facebook Messenger, LINE messenger, and Telegram for example).
Update:
(Disclaimer: I work on Smooch)
What you're getting is a text-only fallback rendering of your carousel. This is what Smooch sends for channels that do not yet support it.
Carousels do not currently render fully in the Smooch Web Messenger, though it is in our backlog. The updated list of supported carousel channels can be found in the Channel Support section here: http://docs.smooch.io/rest/#carousel-message
For cards\carousels we had to map api.ai json to the smooch json called by the Smooch webhook.

Resources