Not receiving Square Connect Webhook for INVENTORY_UPDATED events - webhooks

I have followed the instructions for setting up Square Connect web hooks.
I entered my Notification URL in the developer portal and enabled web hooks. I then sent a test notification. I verified that is working correctly.
I subscribed to "INVENTORY_UPDATED" with the Update Webhooks endpoint.
I verified that worked by calling /v1/{{location_id}}/webhooks. The response is
["INVENTORY_UPDATED"]
So I know that my location is properly subscribed to INVENTORY_UPDATED notifications.
But when I sign into the dashboard and create new items or update the inventory
count on those items, I don't receive any notifications.
I'm stumped.
Do inventory updates in the dashboard trigger INVENTORY_UPDATED webhook events? If so, did I miss a step?
Any suggestions of how to troubleshoot this?

You need to subscribe to the webhook notification by:
open your terminal or cmd (on your PC).
Run (curl -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d "[\"INVENTORY_UPDATED\"]" https://connect.squareup.com/v1/YOUR_LOCATION_ID/webhooks)
NOTE: Your Access token and Location are found on the dashboard of your square account.

Related

Azure Bot Framework bot does not reply often in Microsoft Teams

I created Azure Bot Framework bot using REST API.
Bot replies in Web Chat all the time but the bot does not reply in Teams often. (Bot reply in Teams sometimes but very unstable)
When bot does not reply in Teams, it seems no messaging endpoint access in server log. Might it be a channel problem?
I added channel of Microsot Teams and I also tried adding channel of Skype before adding channel fo Teams like the article below but I got same problem still.
https://social.msdn.microsoft.com/Forums/ja-JP/cb4bbbfd-8202-4c12-bd2d-9e1f02bffcb5/botframework-azure-web-app-bot-dose-not-repry-from-microsoft?forum=windowsazureja
Tested like this
curl -X POST {serviceUrl}v3/conversations/{conversationId}/activities/{activityId} -H 'Authorization: Bearer {accessToken}' -H 'Content-Type: application/json' -d '{"type":"message","from":{"id":"...","name":"..."},"conversation":{"conversationType":"personal","id":"..."},"recipient":{"id":"...","name":"...","aadObjectId":"..."},"replyToId":"...","text":"Hello"}'
After I upgraded to MS Teams paid service, then this issue was solved. This was only issue when I use MS Teams free service.

Sending message to different channel via slack webhook fails

I'm not sure if I am understanding the way how to use webhooks quite right, but:
I want to send messages in different channels or to different users (not at once), without being involved in that conversation.
My problem: I can only create webhooks for specific users, so I end up having a unique URL for every user / channel?
If I use something like the "channel" parameter or even the "setReceipent" method from the library I use, it doensn't have any effect and only the channel / user the webhook was created for, receives the message.
Do I need to use API access or can I accomplish my needs using webhooks?
In general incoming webhooks are fixed to the configured channel. So if you want to send messages to users and/or multiple channels you need to create multiple webhooks or send messages though the API (e.g. chat.PostMessage).
However, there is a another way to create webhooks, that allows you to send messages to every channel with the same webhook by adding a channel override property ('channel') to your message. Its how incoming webhooks used to work in the past and part of legacy custom integrations.
To create such a webhook you need to install an app called "Incoming webhooks" from the Slack App Directory (app is made by the Slack team).
Syntax:
POST https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Content-type: application/json
{
"text": "Hello, world.",
"channel": "U12345678"
}
Where U12345678 is the Slack ID of the user you want to send a direct message to.
Note that the channel property is optional and the message will be send to the default channel if omitted.
See here fore the full documentation.
Hooks only allow you to send to the channel defined in the hook.
If you want to send to any channel you need to create a bot user who can post to any channel. To create a bot user you need to do the following:
Add an API app Once done create a bot user (or create and delete a webhook )
Create a bot user or create and delete a webhook (which will create the bot user for you)
Add chat:write and possibly chat:write.public to the OAuth & Permissions of the API App.
Grab the Bot User OAuth Access Token it should start xoxb
Post to https://slack.com/api/chat.postMessage
eg
curl -X POST \
-H 'Authorization: Bearer xoxb-###-###-***' \
-H 'Content-type: application/json' \
--data '{"channel": "#general","text":"Hello, World!"}' \
https://slack.com/api/chat.postMessage
https://api.slack.com/messaging/sending#publishing provides some details

POSTing to Zendesk Api receiving 403

I'm trying to load a ticket into a currently logged in users browser as shown here, https://developer.zendesk.com/rest_api/docs/voice-api/talk_partner_edition#open-ticket-in-agents-browser.
I've tried POSTing using both Postman & cURL but receive 403 Forbidden. I've tried authenticating with my known Zendesk user&password combo.
curl
https://XXXXXX.zendesk.com/api/v2/channels/voice/agents/XXXX/tickets/XXXXX/display.json
-H "Content-Type: application/json" -v -u XXXX#XXXXXXXX.co.uk:XXXXXXXXXXX -X POST
Does anyone know what I could need to do extra?
Cheers
Do you have Talk Partner Edition enabled on your account? This error is common if you don't have a subscription for that specific product. Please contact the support team if you are not sure.

Grafana webhooks - failed to send

I'm trying to set up Grafana to send webhooks to Microsoft Teams. I'm able to curl via terminal to the address but it's not possible via Grafanas interface.
I add the URL to Grafanas "webhook" and when I click "Test" it only shows me an error. Anyone know the solution?
I have not entered username/password since i don't know what to supply.
I tried this also.
With a variety of settings (post, put, slack, webhook)
Long story short, Grafana doesn't support the team webhook format.
I Can curl the webhook and get the hello world example to work (without credentials so it isn't the username and password).
Error grafana gives is:
Webhook response status 400 Bad Request
Getting started with connectors
Action reference

Envelope Sender View

I would like to use the REST API to get a URL to open the sender view:
curl --request POST 'https://demo.docusign.net/restapi/v2/accounts/001122/envelopes/33fef057-1111-1111-8e81-5d93739ae4fd/views/sender' --data '{}' -H 'Accept: application/json' -H 'Authorization: bearer xxxxxxx=' -H 'Content-Length: 2' -H 'Content-Type:application/json'
Response from DocuSign:
{
"url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=888db3ea-1e85-4860-a8e5-e9b37f38d769&DocuEnvelope=29fae057-9213-4485-8e81-5d93739ae4fd&send=1"
}
In our application, I would like to create an envelope in the "created" status with default values and then open the sender view so that the user can complete the envelope and send it.
The end user is not supposed to know the credentials for the authenticating user that I am using to create the envelope and to open the sender view: the url returned by the API contains a token that should work for some minutes.
I have implemented this solution and everything works, but there is something that I was not expecting. I thought that the url returned could be used only to execute a single operation (to send the envelope), but it seems that the user has complete access to the account as if he/she has executed a login.
Is there a way to limit the access just to the sender view for the given envelope?
Thank you,
Marco
Using the embedded Sender view (or the embedded Correct view) will always grant the user (sender) the same access to that DocuSign account as they would have if they logged into the console directly with the credentials supplied in the API request header. i.e., even though they are initially taken directly into the Envelope that the API request specifies, there's nothing to prevent them from navigating outside of that Envelope to other areas of the DocuSign console, where they'll have full access to the account to view/send/delete Envelopes, etc.
I had a similar requirement while using the embedded sending and signing using Docusign APIs. If you want to customize the sender view and restrict him to access the other docusign features of his account, you can look into branding. As an admin user you can edit the branding details of a docusign account to enable and disable certain options like "Go Back" to dashboard options.
Refer to below link for more details,
https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/quick-start-account-branding.pdf

Resources