kasunkv / slack-notification

Slack Notification task with advanced slack message customization for Visual Studio Team Services
MIT License
20 stars 9 forks source link

API Error - Missing Scope #16

Open mentallabyrinth opened 6 years ago

mentallabyrinth commented 6 years ago

Hello,

Thank for making this extension, however, it's not working for us. We're not sure why and if it's a fault of ours. We followed the instructions and generated a token using the "Legacy Token Generator." When the task runs on Azure Dev Ops, it fails and we get the following message:

"An API error occurred: missing_scope"

While creating the legacy token, there's no option to modify scopes. According to the generator the following scopes are enabled by default: identify, read, post, client, and admin. Are we doing something wrong?

The version we're using is: 5.* (According to the Azure Dev Ops Task display)

Thank you.

justinokay commented 2 years ago

I'm having this same issue. I tried legacy token and received that error. I also tried app level token and set the scrope to read and write to which I get this error:

Task Failed. Error: "One or more messages failed to deliver. An API error occurred: invalid_auth"

[error]Task Failed. Error: "One or more messages failed to deliver. An API error occurred: invalid_auth"

olegbzk commented 1 year ago

Same here. Curl works with this token without problems.

  - task: SlackNotification@6
    inputs:
      SlackApiToken: '$(slack_token)'
      MessageAuthor: 'Azure DevOps'
      Channel: 'devops-az-devops'
      NotificationType: 'ChatMessage'
      Message: 'Tost'

image

image

olegbzk commented 1 year ago

Look like it's my mistake. Have to put # before channel name.