Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In
  • Home

  • Dev Essentials

    • OAuth

    • Webhook Subscriptions

    • Events

  • Payments

  • Commerce

  • Customers

  • Staff

  • Merchants

  • Objects & Enums

  • Webhook Events

  • Deprecated

  • SDKs

<- Square API

Square API

All versions ->

OAuth

Allow your application to gain programmatic access to Square seller accounts.

Applications use the OAuth API to obtain access tokens that allow them to call Square APIs on behalf of Square sellers. Applications can request scoped permissions to limit their access to only the resources they need. The OAuth flow for obtaining an OAuth access token has three stages:

Authorization - Your application directs the seller to the Square authorization page using an authorization URL that specifies your requested permissions. The seller signs in to Square and reviews the permissions.

Callback - After approving the permissions, Square redirects the seller back to your application's registered redirect URL with an authorization code appended as a query parameter.

Token request - Your application calls the ObtainToken endpoint with the authorization code, your application ID, and other information. Square returns an access token and refresh token.

For more information, see the following guides:

  • OAuth
  • Square Webhooks Overview
  • Endpoints

  • Webhooks

All versions ->

oauth.authorization.revoked

Published when a merchant/application revokes all access tokens and refresh tokens granted to an application.