I need to build an url that refers to a Slack app.
For example,
I have an url https://slack.com/oauth/pick_reflow?scope=commands&client_id=21113332291.21116743655 and I need to convert it to something like https://slack.com/apps/A0XG4JWM8-drum-meetings
Is there any way to convert client_id=21113332291.21116743655 to A0XG4JWM8-drum-meetings?
Related
Github has a webhooks tab in the settings of a repository and it has a submission for a payload URL. I looked all over the developer site for Twitter but I can't really find anything. I'm still really new to how all of this works.
For Twitter, you need to add your webhook URLs programmatically via the API. The documentation is here. You'll need to send an authenticated HTTP POST request to https://api.twitter.com/1.1/account_activity/all/[YOUR_ENV_NAME]/webhooks.json with the URL specified in the URL parameter.
If you would like something that does more of the work for you - although this is in JavaScript, not Python - you can take a look at this tutorial using autohook.
I'm writing a bot to replace a Zapier script. When setting up messages from Zapier to Slack, it's possible to set the bot name and icon for each individual message. I'm trying to replicate this but I can't work it out.
According to the [slack docs][1] it is possible to set the name by specifying the following parameters: as_user:true, username:BOT_NAME.
I've tried doing this with both the user and bot Oauth tokens and get these responses:
"error":"invalid_arguments","deprecated_argument":"as_user"
"error":"missing_scope","needed":"chat:write:bot","provided":"identity.basic"
It looks like the only scope available is chat:write and chat:write:bot has been deprecated.
How is Zapier able to dynamically set bot names?
[1]: https://api.slack.com/methods/chat.postMessage
I am created slack bot, is there is any possible way send reply message as file? (I need to sent some file as reply message based on input). I tried using api file.upload it make the file as private not able access using url, but if i am upload to channel using sampe api, file is public, is there any way to send direct message as file by bot)
Yes. You can share a file directly and privately with a user by sharing it in a direct message channel with the user.
Just put the {user-id} of the user you want to share the file with in the channels parameter of the files.upload API method and you are all set.
Your slack app will need the files:write:user scope. This also works with bots.
Example for user with ID U12345678:
curl -F content="Hello" -F channels=U12345678 -F token=xoxp-your-token-here https://slack.com/api/files.upload
I have integrated slack in my custom application using the API provided by Slack.
I am able to fetch the post from Slack and able to display it in my application. I am able to fetch the image that was uploaded with the post (Few days back) but today when I added a post with the image. The image is not being displayed in the application, when I am trying to access the image URL in the browser it is asking for Authentication.
I am accessing the slack rest API to fetch the post from slack. from the response I am taking the "thumb_64" parameter from the "file" object.
I am able to access the below image URL, this image was uploaded on 2016-01-11
https://files.slack.com/files-tmb/T0F8RH7U7-F0J505EG1-33434fadf3/screenshot_from_2015-12-28_15_23_39_160.png
But I am not able to access the below mentioned URL ,this image is uploaded on 2016-02-16
https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Thanks & Regards,
Have you seen the update where #slackapi announced about accessing files using the Web API?
Essentially, you now need to provide authentication to access file assets, by specifying an HTTP Authorization header with an OAuth token that has the correct scopes to access that kind of data for a team.
For example, you'd send a header like this with your GET request:
GET https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Authorization: Bearer YOUR_VALID_ACCESS_TOKEN_HERE
The File type documentation goes into further detail.
I am trying to connect to JIRA using OAuth. I have followed this tutorial but when i want to create a new Application Link, it asks me to enter the URL of the application i want to link which seems strange in my case, since i want to connect a Google spreadsheet to JIRA !!!
I really appreciate your help Welsh, i have managed to generate a public key thanks to you and a new application link, now i want to obtain a request token from JIRA but i always get an error message when executing the request token command.
The document states:
When creating the Application Link use a placeholder URL or the correct URL to your client, if your client can be reached via HTTP and choose the Generic Application type.
So you can either use the URL to the Google Docs Spreadsheet that will be using the token to authenticate or you can just use a placeholder URL.