Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR [ExceptionsHandler] An API error occurred: not_authed #324

Open
fahadBSTech opened this issue Sep 15, 2023 · 4 comments
Open

ERROR [ExceptionsHandler] An API error occurred: not_authed #324

fahadBSTech opened this issue Sep 15, 2023 · 4 comments

Comments

@fahadBSTech
Copy link

Hi Everyone,

Hope you guys are doing great. I am using this package to send messages to the slack using SlackServide.postMessage() method. While calling it I am getting this issue. Can anyone help to resolve that issue?

Here is the sample code:

constructor(private readonly slackService: SlackService) {}

this.slackService.postMessage(payload);
@simenandre
Copy link
Member

Hello,

Which version are you using? API, Webhook or Google Cloud Logger?

@fahadBSTech
Copy link
Author

I'm using API version.

@simenandre
Copy link
Member

simenandre commented Sep 16, 2023

Okay, have you made sure the API key is valid? Maybe using curl or Postman to test?

Note: You might have used the wrong key.

@fahadBSTech
Copy link
Author

Yes, I am using the BOT Token to send the message. I verified that using Postman it's working fine. Here is how actually I configured it with the module.

SlackModule.forRoot({
      type: 'api',
      token: process.env.SLACK_BOT_TOKEN,
      isGlobal: true,
    }),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants