slack interactive button give an error " chat.attachmentAction not ok: internal_error " - webhooks

I am trying to implement slack in my project using Bot User OAuth Token. I am able to sent some button on a channel but in response i get a error
" chat.attachmentAction not ok: internal_error "
Interactivity is ON and also request URL is also set.
I tried to solve this from documentation.

Related

Missing Access for Slash Commands

Heres the error message:
PS C:\Users\User\Documents\Discord Bot> node .
ready
C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154
throw new DiscordAPIError(request.path, data, request.method, res.status);
^
DiscordAPIError: Missing Access
at RequestHandler.execute (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async RequestHandler.push (C:\Users\User\Documents\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14) {
method: 'post',
path: '/applications/723863781607997451/guilds/722043668730740788/commands',
code: 50001,
httpStatus: 403
}
Help is appreciated.
This is my first post on stackoverflow, so if I'm posting something wrong, please tell me!
This error is caused because your Discord Bot does not have permission to create commands for that server.
There is two ways to fix this.
Option 1 - In-App Authorization
You should first navigate to the Discord Developer Portal then you should click on the bot that you are getting the issue with.
You will then be prompted with this page:
You should then click on the "OAuth" page, highlighted in red on the above screenshot.
Once you are on this page, you should find the "Default Authorization Link" setting and set it to "In-App Authorization".
Once that option is selected another option will pop up asking what permissions the bot will ask the user for, you can see the screenshot below.
Select bot and application.commands then select the permissions that your bot requires.
Then save your changes.
You will need to re-authorize your bot to the guild before it will work, you do not need to kick it - just click on your bot and click "Add to Server" and re-add it to your guild.
Option 2 - URL Generation
You should first navigate to the Discord Developer Portal then you should click on the bot that you are getting the issue with.
Once you are on that page, you should access the OAuth sub-menu titled "URL Generation" as seen below.
Once you are on this page, you will be presented with a similar output to Option 1, you should configure the scope to be bot and application.commands and then request permissions as your bot needs.
Note
You should use both of these with your Discord bot, you should use Option 1 to setup your in-app authorization permissions and then use Option 2 to get a URL for Discord Bot lists, etc.

Imgur API - Get 400 error when registering an application

I try to register an application, at this webpage, to upload some images to imgur.
After I select the "OAuth 2 authorization without a callback URL", enter the email, and submit the form, I will get the 400 error. As shown in the picture.
Why don't I get the successful message but the error one? Are there limits for a new user?
I see the help page at the imgur.com, and it recommends to post the question about api in here.

IFTTT Webhooks - Not receiving email (but the response says that it was sent)

I'm following this tutorial to send email in App Inventor: https://www.hackster.io/taifun/trigger-ifttt-to-send-an-email-using-app-inventor-9df505 (You will have to scroll down on the page to view the tutorial)
The tutorial is straight forward and easy to understand. However, the IFTTT service (Maker) is now called "Webhooks".
I don't know what else has changed since that tutorial was written.
Following the tutorial:
the URL is correct https://maker.ifttt.com/trigger/Sendmail/with/key/*MYKEY*
the RequestHeaders are correct Content-Type: application/json
the PostText is correct: { "value1" : "faeryofiris#gmail.com", "value2" : "test", "value3" : "test body" }
I have double and triple checked for spelling errors.
Once I click a button to send this email, I receive the response:
"Congratulations! You've fired the Sendmail event!"
Except... there is no email. Both emails are my actual emails, so they are valid emails. "faeryofiris#gmail.com" should be the "FROM" email, and "pixiibomb#gmail.com" is the email that is registered on IFTTT (this should be the email that receives a message from faeryofiris) I keep refreshing my gmail, and still... no email.
Any ideas?
I've run into this issue several times. The solution has always been to click "Edit Connection" on the Webhooks Service Settings page. This will get you a new key. It doesn't solve their issue which is that keys tend to die for no explained reason but it should get your setup working again.

How to update message status with the Slack WEB API

Is there a way to update the status of a message sent from the Slack Web API?
I'm using Slack to build a bot that send Slack messages as SMS using Twilio and I would like to notice the user that the message hasn't been sent if the Twilio call response is an error.
Any suggestions?
I can suggest a blog post by one of my colleagues that walks you through building an SMS Slack bot in Python. You can use it as a guide to translate the setup to Node.js.
The tutorial there shows you how to both send SMS messages to Slack and receive Slack messages via SMS.
Specifically, the following route for receiving Slack messages as SMS:
#app.route('/slack', methods=['POST'])
def slack_post():
if request.form['token'] == SLACK_WEBHOOK_SECRET:
channel = request.form['channel_name']
username = request.form['user_name']
text = request.form['text']
response_message = username " in " channel " says: " text
twilio_client.messages.create(to=USER_NUMBER, from_=TWILIO_NUMBER,
body=response_message)
return Response(), 200
In addition to the code above you could handle any Twilio errors received on a message Status ErrorCode ErrorMessage and notify a user in Slack via the chat.update method.

Linkedin Profile URL

I was using this url to view a linkedin profile using user id:
http://www.linkedin.com/profile/view?id=USER_ID
But now the link is not working. tried it from some user and i keep getting this error from linked:
There was an unexpected problem that prevented us from completing your request.
used this code to get the linked in user ID:
F.Promise<WSResponse> linkedinInfoResponse = WS.url(Play.application().configuration().getString("api_call_url")) .setHeader("Authorization", "Bearer " + access_token) .setHeader("x-li-format", "json") .get();
Any idea whats the issue??
You can try this.
1.) Clear the cache and cookies from your browser.
2.) Log out and login again.
3.) Log in from another browser.

Resources