OAuth Connections

Store OAuth2 credentials at the workspace level so HTTP automation actions can call third-party APIs as an authenticated user.


An OAuth connection stores an OAuth2 credential — an access token, optionally a refresh token, and provider metadata — inside a workspace, so that HTTP automation actions can call a third-party API as an authenticated user. You bring tokens you already obtained from the provider; Blue does not run the OAuth authorization flow for you. The supported providers are GitHub and Intuit QuickBooks.

OAuth connections are OAuthConnection objects in the API, scoped to a workspace (Project). A connection is consumed by an automation’s MAKE_HTTP_REQUEST action: set the HTTP option’s authorizationType to OAUTH2 and reference the connection by oauthConnectionId, and the action sends the connection’s token on each request.

Tokens are write-only

accessToken and refreshToken are accepted only when you create a connection. They are never returned on the OAuthConnection type, and there is no rotation mutation — updateOAuthConnection only renames a connection. To replace a token, delete the connection and create a new one.

Operations

OperationMutation / Query / SubscriptionDescription
Create an OAuth connectioncreateOAuthConnectionStore an access token (and optional refresh token) for a provider in a workspace.
List OAuth connectionsoauthConnectionsPage through the connections in a workspace, with optional filtering and sort.
Update and delete a connectionupdateOAuthConnection / deleteOAuthConnection / subscribeToOAuthConnectionRename a connection, remove one, or subscribe to real-time connection changes.

Providers

OAuthProvider has exactly two values:

ValueProvider
GITHUBGitHub
INUIT_QUICKBOOKSIntuit QuickBooks

INUIT_QUICKBOOKS is spelled exactly as shown — pass it verbatim.

Authorization

The two authorization rules differ between the mutations and the list query:

  • Mutations (create, update, delete) require the caller to be any member of the connection’s workspace.
  • Listing (oauthConnections) returns only connections in workspaces where the caller is a member at ADMIN or OWNER level — more restrictive than the mutations.

Blue does not refresh tokens for you. expiredAt is whatever expiry you supply on create; nothing in these operations renews or rotates a token automatically.

The OAuthConnection type

FieldTypeDescription
idID!Unique identifier. Used to update or delete the connection.
uidString!Short public identifier.
nameString!Human-readable label.
providerOAuthProvider!GITHUB or INUIT_QUICKBOOKS.
expiredAtDateTimeToken expiry you supplied on create, or null. Never auto-updated.
metadataJSONFree-form, provider-specific metadata you supplied on create, or null.
projectProject!The workspace the connection belongs to.
createdByUser!The user who created the connection.
createdAtDateTime!Creation timestamp.
updatedAtDateTime!Last-update timestamp.

There is no accessToken or refreshToken field — those exist only on CreateOAuthConnectionInput.