Open jsmestad opened 3 years ago
I believe this requires a completely different token. I had to do generate an App Level Token in Basic Info on your Bot screen, to do something similar. Then you can fetch it like so (using httppoison)
case HTTPoison.post(
"https://slack.com/api/apps.event.authorizations.list",
"",
[
{"Authorization", "Bearer xapp-1-...."},
],
[timeout: 1000, recv_timeout: 1000]
) do
{:ok, %HTTPoison.Response{status_code: 200, body: body}} ->
{:ok, json} = Poison.decode!(body)
IO.inspect(json["url"])
{:ok, json["url"]}
end
I cannot seem to find in the hexdocs any support for the apps.event.authorizations.list endpoint. Did I miss it or is it indeed missing? I am happy to add support for it if anyone can provide some direction on how to do that.