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

Slack Audit logs endpoint host is wrong #1144

Open
GalNakash-RecoLabs opened this issue Dec 19, 2022 · 1 comment
Open

Slack Audit logs endpoint host is wrong #1144

GalNakash-RecoLabs opened this issue Dec 19, 2022 · 1 comment

Comments

@GalNakash-RecoLabs
Copy link

What happened

The API GetAuditLogs sends a request to https://slack.com/api/

Expected behavior

The audit logs API is accessible only via api.slack.com

Steps to reproduce

  1. Generate a slack client with a valid token for auditlogs:read
  2. Call to get GetAuditLogs
  3. Error will be the HTML page "You've found a glitch

reproducible code

_, nextCursor, err = slackClient.GetAuditLogs(slack.AuditLogParameters{
Limit: maxAuditLogMessages,
Oldest: oldest,
Latest: latest,
Cursor: nextCursor,
Action: eventType,
})

manifest.yaml

Versions

  • Go:
  • slack-go/slack:
@kanata2 kanata2 added bug [issue] bug Web API and removed bug [issue] bug labels Dec 20, 2022
@kanata2
Copy link
Member

kanata2 commented Dec 20, 2022

Thanks for reporting.
You can call Audit Log APIs correctly by setting Base URL as follows.

slack.New(token, slack.OptionAPIURL("https://slack.com/")

However, it seems inconvenient that only one endpoint can be set per Slack client, so I will consider some other way.

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

No branches or pull requests

2 participants