Integrations
Connect Google Drive
Exchanges an authorization code obtained from Google's initCodeClient
popup flow (scope drive.file, access_type: offline) for a refresh
token and an access token. The refresh token is encrypted and stored
server-side (Redis, TTL matched to the user's session lifetime); the
access token is returned directly to the client for immediate use with
the Google Picker API and is never persisted.
Authorization
token_auth AuthorizationBearer <token>
Token-based authentication using access tokens.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://v2.api.piktid.com/integrations/google-drive/connect" \ -H "Content-Type: application/json" \ -d '{ "code": "string" }'{
"connected": true,
"email": "string",
"picker_access_token": "string",
"expires_in": 0
}{
"error": "Invalid request",
"detail": [
{
"field": null,
"message": "string",
"position": "query"
}
]
}Empty