slack
slack copied to clipboard
fix: create multipart form when multipart request
This PR fixs form parameter format when multipart request.
@EkeMinusYou Could you add an explanation of what the problem is with the current implementation, or a link to the issue?
@kanata2 It is not clearly described in Slack's API documentation and is difficult to explain.
https://api.slack.com/methods/files.remote.add
However, when I checked the actual behavior, it seems that in the case of mutlipart request, the parameters must be put in the body instead of the query. Otherwise the token cannot be passed and authentication will fail.
Hi @EkeMinusYou @kanata2 , any updates on this?
context:
This worked fine for me when using files.remote.add
using postman with same params but failed with slack-go
I was receiving invalid_auth
when using AddRemoteFileContext
. I had not investigated why this was happening but I did check my bot token and all other attributes.
Seems like this PR should fix that issue.
@samarthkathal this PR may be a valid fix for #1295 but I've having some trouble reproducing the issue to understand whether this would fix it. Would you be able to help me reproduce the issue?
@samarthkathal this PR may be a valid fix for #1295 but I've having some trouble reproducing the issue to understand whether this would fix it. Would you be able to help me reproduce the issue?
@lorenzoaiello see my comment here to repro: https://github.com/slack-go/slack/issues/1295#issuecomment-2234141986