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

Deprecating usage of token as a query string parameter in Web API requests #857

Closed
eliot-stripe opened this issue Nov 30, 2020 · 1 comment
Labels
spec changes Slack's specification changes

Comments

@eliot-stripe
Copy link
Contributor

Slack announcement (2020-11-30): https://api.slack.com/changelog/2020-11-no-more-tokens-in-querystrings-for-newly-created-apps

Based on my initial splunking, it looks like getResource passes the the request parameters as a URL parameters:

slack/misc.go

Lines 259 to 268 in 853f55b

func getResource(ctx context.Context, client httpClient, endpoint string, values url.Values, intf interface{}, d debug) error {
req, err := http.NewRequest("GET", endpoint, nil)
if err != nil {
return err
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
req.URL.RawQuery = values.Encode()
return doPost(ctx, client, req, newJSONParser(intf), d)
}

The callsites of this include token as one of those URL parameters: https://github.com/slack-go/slack/blob/master/chat.go#L696-L714

It's possible that other http methods do as well, but I haven't done an exhaustive search of the codebase.

@kanata2
Copy link
Member

kanata2 commented Apr 17, 2021

Fixed in v0.8.3

@kanata2 kanata2 closed this as completed Apr 17, 2021
kanata2 added a commit to kanata2/slack-go-sandbox that referenced this issue Apr 17, 2021
@kanata2 kanata2 pinned this issue Apr 18, 2021
@kanata2 kanata2 unpinned this issue Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec changes Slack's specification changes
Projects
None yet
Development

No branches or pull requests

2 participants