diff --git a/oauth2.go b/oauth2.go index 0ee357a..9954b1e 100644 --- a/oauth2.go +++ b/oauth2.go @@ -2,6 +2,18 @@ package ebay import "golang.org/x/oauth2" +// eBay OAuth 2.0 endpoints. +var ( + OAuth20Endpoint = oauth2.Endpoint{ + AuthURL: "https://auth.ebay.com/oauth2/authorize", + TokenURL: "https://api.ebay.com/identity/v1/oauth2/token", + } + OAuth20SandboxEndpoint = oauth2.Endpoint{ + AuthURL: "https://auth.sandbox.ebay.com/oauth2/authorize", + TokenURL: "https://api.sandbox.ebay.com/identity/v1/oauth2/token", + } +) + // BearerTokenSource forces the type of the token returned by the 'base' TokenSource to 'Bearer'. // The eBay API will return "Application Access Token" or "User Access Token" as token_type but // it must be set to 'Bearer' for subsequent requests.