Files
Create a hosted Google Picker session
Changed onCreates a hosted Google Picker session so your end user can grant Zernio access to Drive files.
Google accounts are connected with drive.file, so Zernio opens only files it created or the user picked (see the Files tag).
- Create a session.
- Send the user to url.
- They pick files in Google Picker on a Zernio-hosted page.
Redirect
When they finish, the browser is sent to redirectUrl with these query params added (existing params are kept):
- status=picked, pickerSessionId, fileIds (comma-separated Drive file ids, already checked against Drive), or
- status=cancelled, pickerSessionId when the user pressed Cancel.
A file.picked webhook fires on every successful pick, so redirectUrl is optional for server-side integrations. Closing the picker without picking keeps the session open; the user can try again until it expires.
Limits
- The URL is single-use and expires after 30 minutes; create a new session for every pick.
- Google accounts only: Microsoft accounts answer 400 platform_not_supported because OneDrive needs no picker.
- Picks are permanent grants: once picked, a file stays readable through the Files endpoints until the user removes Zernio from their Google account.
post/v1/files/picker-sessions
Request
- Base URLhttps://zernio.com/api
- URLhttps://zernio.com/api/v1/files/picker-sessions
- AuthHTTP bearer
Request body
Example request
{
"mimeTypes": [
"image/png",
"image/jpeg",
"application/pdf"
]
}Response
The session
Example response
{
"data": {
"id": "ps_3f2a9c0d1e7b4a6c8d9e0f1a"
}
}Changes
- info
endpoint added
- info