Call a user via the Slack API? - slack-api

If you go to the web UI or app you can see an option to call a user:
Is there a way to call a user via the Slack API or not?
Thanks for your time!

Related

Twilio: track user action on SMS links and reply based on that action

I using twilio flow to create simple chatbot that sends user a whatsapp message with link to provide some details and once user has provided the required details on web page, chat bot must reply with a THANKS message.
Is there anything like postback using rest api on active execution based on which a thank you message can sent.
Please have look on diagram as well.
Twilio developer evangelist here.
When you say you are using Twilio flow, I guess you are using Twilio Studio to send the messages. In this case, I don't think you can achieve what you want with Studio. You can't move an execution on with the REST API.
However, it should be fairly straightforward to send the thank you message from your application using the Twilio Messaging API instead.
What you will need to do is, when the user submits the form, in your back-end code as well as saving the data to your database, make a call to the Twilio API to send the WhatsApp message. I'm not sure what your application is built in, so I've just linked to the relevant documentation.

Send Message in Teams Chat/Channel as a User

Trying to send out chat message from Bot with sender as a current logged in user. I am able to implement this with graph api using On Behalf of flow. However the API is still in Beta and don't think we can use it in production setting.
https://learn.microsoft.com/en-us/graph/api/chat-post-message?view=graph-rest-beta&tabs=http
Is there a different way? Can we use ConnectorClient? Tried this, but the chat message is sent by the bot instead of the current logged in user. I am not able to create user token with botframework.com. It is always bot or the registered app.
Do anyone know if there is a way to accomplish this avoiding the graph beta api?

How to make your bot user reply with a simple help message using slack bot

I have created a slack bot and I want to send a general static help message to users when they send a direct message to my bot:
Should I subscribe to Events API? Or do I need to do this in another way? I couldn't find a clear answer for this.
There are two ways to do make your bot user reply to direct messages:
Events API
Real Time Messaging API
In my opinion the Events API approach is easier to implement since it does not require using WebSockets.
The basic approach with the Events API is:
You need an endpoint that can receive event requests from Slack and
react to it, e.g. by sending a direct message back to a user.
Subscribe to message.im event for your bot user
Note that a bot user already has all the required scopes for this with the bot scope.
In addition I would recommend to subscribe to app.mention for your bot user. Then it can also react to mentions in other channels.
Btw. that message you posted looks a lot like a review comment from the Slack team for a new app submission. I got a similar one for my last app and I solved it with the approach above. In general it looks like if you want to have a bot user in your app it needs to be able to respond to help request from users.

How to use Slack API and OAuth2 to signup and authenticate for an android app?

I am looking to mimic the function of "Sign Up with Facebook" but with Slack instead, using their API and Oauth2.
Has this ever been done before and/or is it possible?
Here are the docs for authenticating against the Slack API.
Then use the auth.test endpoint to get the current user's ID.
Finally you make a call to the users.info endpoint to get the e-mail, first name, last name of the user.

Twitter dev: How do I automatically trigger an action whenever the user tweets w/o polling?

I am working on an app where I need to perform an action whenever I tweet. (just ping a URL or whatever)
Is there a way to do this without polling?
Example:
I(as a user that has authorized my twitter app) posts a tweet.
The app then pings http://example.com/some_webhook
It seems like the twitter app that I created a dev.twitter.com and then authorized on my account should be aware of when that account tweets. is there a trigger or something?
How does IFTTT do this? I have some recipes with them that trigger whenever I tweet. Are they just polling twitter?
The same goes for the facebook connectivity that publishes your tweet to facebook. What hook are they using to accomplish this?
I'm using the twitter gem on a Rails 4.1 application right now, but I'm stuck on this part. Please help. any guidance is very appreciated!
Use the Twitter Streaming API - https://dev.twitter.com/docs/api/streaming or, you can poll every few seconds (be sure to check the API rate limit).

Resources