func (api *Client) AuthTestContext(ctx context.Context) (response *AuthTestResponse, err error) {
	api.Debugf("Challenging auth...")
	responseFull := &authTestResponseFull{}
	err = api.postMethod(ctx, "auth.test", url.Values{"token": {api.token}}, responseFull)
	if err != nil {
		return nil, err
	}
	return &responseFull.AuthTestResponse, responseFull.Err()
}
AuthTestContext tests if the user is able to do authenticated requests or not with a custom context
package slack
import (
	"context"
	"fmt"
	"log"
	"net/http"
	"net/url"
	"os"
)
const (
	APIURL = "https://slack.com/api/"
	WEBAPIURLFormat = "https://%s.slack.com/api/users.admin.%s?t=%d"
)
type httpClient interface {
	Do(*http.Request) (*http.Response, error)
}
type ResponseMetadata struct {
	Cursor string `json:"next_cursor"`
}
func (t *ResponseMetadata) initialize() *ResponseMetadata {
	if t != nil {
		return t
	}
	return &ResponseMetadata{}
}
type AuthTestResponse struct {
	URL    string `json:"url"`
	Team   string `json:"team"`
	User   string `json:"user"`
	TeamID string `json:"team_id"`
	UserID string `json:"user_id"`
	EnterpriseID string `json:"enterprise_id,omitempty"`
}
type authTestResponseFull struct {
	SlackResponse
	AuthTestResponse
}
type ParamOption func(*url.Values)
type Client struct {
	token      string
	endpoint   string
	debug      bool
	log        ilogger
	httpclient httpClient
}
type Option func(*Client)
func OptionHTTPClient(client httpClient) func(*Client) {
	return func(c *Client) {
		c.httpclient = client
	}
}
func OptionDebug(b bool) func(*Client) {
	return func(c *Client) {
		c.debug = b
	}
}
func OptionLog(l logger) func(*Client) {
	return func(c *Client) {
		c.log = internalLog{logger: l}
	}
}
func OptionAPIURL(u string) func(*Client) {
	return func(c *Client) { c.endpoint = u }
}
func New(token string, options ...Option) *Client {
	s := &Client{
		token:      token,
		endpoint:   APIURL,
		httpclient: &http.Client{},
		log:        log.New(os.Stderr, "slack-go/slack", log.LstdFlags|log.Lshortfile),
	}
	for _, opt := range options {
		opt(s)
	}
	return s
}
func (api *Client) AuthTest() (response *AuthTestResponse, error error) {
	return api.AuthTestContext(context.Background())
}