@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Class OAuthService

    OAuth operations authenticated with the client's merchant access token.

    Code exchange, refresh and revocation use application credentials instead. They live on SquareOAuthClient (createSquareOAuthClient).

    const square = createSquareClient({ accessToken: tenant.accessToken });
    const status = await square.oauth.tokenStatus();
    Index
    • Get the scopes, expiry and merchant of this client's access token. Use it as a connection health check, or to confirm a required scope was granted.

      Returns Promise<OAuthTokenStatus>

      Token status

      If the token is invalid, expired or revoked

      const { scopes, expiresAt } = await square.oauth.tokenStatus();
      if (!scopes.includes('MERCHANT_PROFILE_READ')) {
      // ask the seller to reconnect with the missing permission
      }