diff --git a/slack/slack.go b/slack/slack.go index 593d2f607..fb96ceb8b 100644 --- a/slack/slack.go +++ b/slack/slack.go @@ -3,13 +3,14 @@ // license that can be found in the LICENSE file. // Package slack provides constants for using OAuth2 to access Slack. +// For Classic Slack Apps - https://api.slack.com/docs/oauth package slack // import "golang.org/x/oauth2/slack" import ( "golang.org/x/oauth2" ) -// Endpoint is Slack's OAuth 2.0 endpoint. +// Endpoint is Slack's classic OAuth 2.0 endpoint. var Endpoint = oauth2.Endpoint{ AuthURL: "https://slack.com/oauth/authorize", TokenURL: "https://slack.com/api/oauth.access", diff --git a/slackv2/slackv2.go b/slackv2/slackv2.go new file mode 100644 index 000000000..a21a7eaba --- /dev/null +++ b/slackv2/slackv2.go @@ -0,0 +1,17 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package slack provides constants for using OAuth2 to access Slack. +// For Granular Scoped Apps - https://api.slack.com/authentication/oauth-v2 +package slack // import "golang.org/x/oauth2/slackv2" + +import ( + "golang.org/x/oauth2" +) + +// Endpoint is Slack's new OAuth 2.0 endpoint. +var Endpoint = oauth2.Endpoint{ + AuthURL: "https://slack.com/oauth/v2/authorize", + TokenURL: "https://slack.com/api/oauth.v2.access", +}