Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Copy page
Open raw Markdown

Start Google Sheets OAuth

Create a single-use OAuth attempt for connect, add-file, or reconnect.

Endpoint

POST/api/v1/workspaces/{workspace_id}/google-sheets/oauth/start

Authentication

Operation classAuthenticationMinimum roleAPI key
dashboard-session-apiDashboard session cookie; POST mutations also require X-CX-Request: 1.adminNot allowed

Parameters

NameInTypeRequiredDescription
workspace_idpathstringYes—

Request body

application/json request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectPermintaanMulaiOAuth—NoYes——
connection_idstring or null——YesNo——
purposestring——NoYes"connect", "add_file", "reconnect"—

Example

cURL
curl --request POST 'https://operade.ai/api/v1/workspaces/ws_demo/google-sheets/oauth/start' --cookie 'cx_session=YOUR_SESSION_COOKIE' --header 'X-CX-Request: 1' --header 'Content-Type: application/json' --data '{"purpose":"connect"}'
Request body JSON
{
  "purpose": "connect"
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
200Successful Responseapplication/json: GoogleOAuthStartResponse

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

200 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectGoogleOAuthStartResponse—NoYes——
authorization_urlstring——NoYes——

Response example

Response body JSON
{
  "authorization_url": "https://accounts.google.com/o/oauth2/v2/auth?..."
}

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
401unauthenticatedAuthentication is missing, invalid, or revoked.
403forbiddenOnly a workspace admin or owner can start Google OAuth.
404not_foundThe requested Google connection was not found.
409conflictThe Google connection status does not allow this OAuth purpose.
422validation_failedPurpose and connection ID do not form a valid OAuth request.
503google_integration_not_configuredThe Google Sheets integration is disabled or incomplete.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. application/json request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 200 application/json response schema
  10. Response example
  11. Errors
  12. Related operations