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

Accessing apps.events.authorizations.list or advice on how to add support? #241

Open
jsmestad opened this issue Dec 20, 2020 · 1 comment

Comments

@jsmestad
Copy link

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.

@nacengineer
Copy link

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

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

No branches or pull requests

2 participants