Code Monkey home page Code Monkey logo

Comments (4)

timrabbetts avatar timrabbetts commented on May 21, 2024

e.g

Usage

Slack used to have a custom integerations section, allot of docs use this, but the new way is building an app.

You need to create an app and get the token for that app to communicate with slack.

  • goto https://api.slack.com/apps
  • create an app with bot option
  • once app created goto the OAuth & Permissions section where you will find a Bot User OAuth Access Token, thats the token you need to add to the code.
  • you can get your user id going to the profile and account section of the web based desktop app, its the last value in the url at the top, starts with U or W.

Then, use the factory that is provided to create the client:

There are some good examples in this repo /doc/examples

from slack-php-api.

lyrixx avatar lyrixx commented on May 21, 2024

Hello

how do I push this raise pull request so you might want this?

Thanks for proposing a pull request. You can read the doc about it there

from slack-php-api.

dev-mansonthomas avatar dev-mansonthomas commented on May 21, 2024

I agree that docs could be improved :)

I'm stuck with this error :
Slack returned error code "missing_scope"

And I don't feel it's specified in the example or docs here what to do with scope.

from the slack doc : https://api.slack.com/legacy/oauth-scopes
it seems we have to make some calls to setup scopes.

from slack-php-api.

dev-mansonthomas avatar dev-mansonthomas commented on May 21, 2024

Found it here :
https://api.slack.com/authentication/basics

You can select the scopes to add to your app by heading over to the OAuth & Permissions sidebar.

Scroll down to the Scopes section and click to Add an OAuth Scope.

For example, try adding the chat:write scope to your Bot Token. It'll allow your app to post messages!

Now I get a channel not found, while I specify the correct channel name...

from slack-php-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.