ExQuickBooks.Auth (ex_quickbooks v0.9.0)

Copy Markdown View Source

OAuth 2 helpers for QuickBooks Online.

Summary

Functions

Builds the QuickBooks authorization URL.

Exchanges an authorization code for QuickBooks OAuth tokens.

Refreshes QuickBooks OAuth tokens using the latest refresh token.

Functions

authorization_url(options)

@spec authorization_url(keyword()) ::
  {:ok, String.t()} | {:error, ExQuickBooks.Error.t()}

Builds the QuickBooks authorization URL.

exchange_code(options)

@spec exchange_code(keyword()) ::
  {:ok, ExQuickBooks.Token.t()} | {:error, ExQuickBooks.Error.t()}

Exchanges an authorization code for QuickBooks OAuth tokens.

refresh_tokens(options)

@spec refresh_tokens(keyword()) ::
  {:ok, ExQuickBooks.Token.t()} | {:error, ExQuickBooks.Error.t()}

Refreshes QuickBooks OAuth tokens using the latest refresh token.