Messaging in xmatters through API call - xmatters

I am trying to message or send alert in Xmatters using API in postman. This call was successful and an Id also generated in response, but the message was not reached to the Targeted person.When I did it from UI the mail was sent to the targeted person.

What was the endpoint of your API? Were you targeting an inbound integration endpoint (api/integration/functions/UUID/triggers), or the form endpoint (/reapi/yyy-mm-ddd/forms/UUID/triggers)? If you target the inbound integration endpoint, you will get a UUID returned while the form endpoint will return an event ID.
If an event was created, you will see an entry in the reports tab of the UI for that event and it will have any errors around notifying users.

Related

How to see/track the exact HTTP response (code and message) that an Eventgrid webhook endpoint receives?

I have a Webhook Eventgrid subscription. I do not have access to the webhook logs or implementation.
Apparently ,Eventgrid receives HTTP code other than success from the webhook, but I do not have any detail visibility to that.
How can I see the exact HTTP interaction (Response message, HTTP Code) for the EventGrid WebHook Bad Requests like the ones pointed below?
You need to configure the dead letter on your event grid subscription as documented here.
Once the events are not delivered and dead letter now you can review the lastDeliveryOutcome property on the dead letter events to know what was the reason the event was not delivered to the configured endpoint.
You cannot find the reason for each request at your end as the event may be delivered at a later point in time once it is retried.

In a group chat, should the new message event (websocket) be sent by the client or the API?

I have a doubt, in a group chat system that has a database with a rest API, who should issue the event of a new message?
The client or the endpoint to create the new message?
For example: X user sends a message to group Y, then uses the api endpoint api.com/message-create and that endpoint emits the message-create event through websocket
Example 2: X user sends a message to group Y, then uses the api api.com/message-create endpoint and the endpoint does not emit the message-create event, but was emitted when the user pressed the send message button
I still don't quite understand if it would occupy more websocket channels to achieve that, if a global one is enough, etc.
The server should be responsible for communication logic. So your first example is better.
But: why do you use two communication channels for sending an creating messages?
If you use websocket, you don't need create a message from a client by using additional rest endpoint.
This approach is prone to errors. For example if the client will loose network connection after sending message through websocket and before executing call to the REST endpoint?
The message will not be stored in a database.
Your flow should looks as follows:
User clicks the send button.
Message is send through the websocket.
Message is stored in the database asynchronously (you can do it directly from communication server, or use rest endpoint)
Emit "new message" event to the group.

Spring Integration - Outbound Gateway - Chaining

I have a FileUpload Event that should be sent over to a http:outbound upload URL. In order to do this I have to first authenticate login URL and get the response and set the session id for outbound upload URL to execute. In my case, I have an event listener which listens for the application to publish the event of File Upload. Once it is published my listener can pick up and execute the flow. I am trying to see how this can be implemented because File Upload object would need to persisted until the Login response comes back. Thanks!
For this purpose we suggest a Header Enricher pattern. So, you place that "FileUpload Event" object into some header and restore it back to the payload when you get that session id response.
So, you add a Header Enricher before first HTTP Outbound Gateway.
After this gateway you rearange your message to place that header back into a payload and do something with a session id. (Header I guess?). And only after that your have another HTTP Outbound Gateway for uploading your file.

Authentication for 'HTTPPost' action on Teams MessageCard to call API through Azure App Proxy

I have an internal API that I'm making available through Azure App Proxy with AAD Pre-authentication.
Now I want to call that API from a MessageCard HTTPPost action in Teams.
When I click on the action button I do not see any errors, and Fiddler shows me a 200 respose and I can see the token in the authorization header and the below in the body:
{"status":"Completed","actionId":"65d36e8b-e90a-4007-a556-bc4c74da8f1e","performedAt":"2019-12-03T16:23:45.0463267Z","properties":{"displayMessage":""}}
But nothing happens after that.
Am i missing something?
Can you test your API with Webhook.site and see if you are able to get proper response.

How do I retrieve the sender number when using Twilio's messaging services with Copilot enabled?

I have a Twilio messaging service with Copilot and the sticky sender feature enabled.
I would like to view the phone number that Copilot assigns to my recipients when I send them a message.
With the Ruby client, I get a MessageContext object when I send a message, but it only has the
messaging service SID - the from method returns nil.
Currently, this is how I'm sending messages:
def send(from, to, message)
client = Twilio::REST::Client.new(ACCOUNT_SID, AUTH_TOKEN)
client.api.account.messages.create(
body: message,
messaging_service_sid: from,
to: to,
status_callback: BASE_URL + '/sms_status/status',
)
end
Twilio developer evangelist here.
I'm not sure, but you might not have the phone number at the time you make the API request using a messaging service. This request really just queues up the message to be sent.
I would check the message object once it has been sent. You have a status callback URL setup, so you should be able to either inspect the parameters sent to that URL or look up the message from the API using its SID and then get the number that was used.

Resources