Get a signed URL for uploading a recording
Upload Recordings
Get a signed URL for uploading a recording
Generate signed upload and download URLs for an audio file. The upload URL can be used to upload the file directly to cloud storage.
POST
Get a signed URL for uploading a recording
Generates a short-lived signed upload URL for an audio file plus a matching download URL. This is the first step of the direct-upload flow: upload your audio to cloud storage with
Then call Post recordings upload with
uploadUrl, then pass downloadUrl as fileUrl to Post recordings upload to create the recording.
Response fields
| Field | Description |
|---|---|
uploadUrl | Signed URL to PUT the file body to (Google Cloud Storage). |
uploadHeaders | Headers you must send with the PUT — see below. |
downloadUrl | Pass this as fileUrl when creating the recording. |
expiresAt | When the signed URLs expire (ISO 8601). Upload before this time. |
Required upload headers
The values ofContent-Type and x-goog-content-length-range are baked into the signature of uploadUrl. You must send them exactly as returned in uploadHeaders, or GCS rejects the upload with a 403 SignatureDoesNotMatch.
-
Content-Type— the MIME type for thefileTypeyou requested. Siro maps extensions as follows:fileTypeContent-Typemp3audio/mpegwavaudio/wavaacaudio/aac -
x-goog-content-length-range—0,<fileSize>, where<fileSize>is the exact byte size you passed in the request. The uploaded body must fall within this range.
Example upload
fileUrl set to downloadUrl.Authorizations
OAuth access token for user-scoped requests (Authorization Code or machine-to-machine). Send header x-siro-auth-token: <oauth-access-token>. Not an organization API key.
Body
application/json