Skip to main content
This guide will show samples in different languages for our Coinbase Business OAuth2 flow. It assumes that you have already created an OAuth client on the Coinbase Developer Platform.
Remember to include your RedirectURI within your OAuth2 client in order for a redirect to take place after the user has completed their OAuth2 step.
  1. Create a new directory and generate a Go file called main.go.
  2. Paste the Go snippet below into main.go.
  3. Run go run main.go
  4. Visit http://localhost:8000/login (for this example)
  5. Go through OAuth2 process and confirm you’re being redirected to http://localhost:8000/callback (for this example)