talque
  • External integrations for talque
  • JSON API (readonly)
    • General
      • Locales and Text
    • Organization
      • Read
    • Lecture
      • List
      • Read
      • Files
      • Authorization
    • Speaker
      • List
      • Read
      • Authorization
    • Participants
    • Vendors
      • List
      • Read
      • Authorization
    • Room
      • List
      • Read
    • Enumerations
      • Locale
  • Deep links
    • General
    • Organization
    • Profile links
    • Lecture links
    • Partner links
    • Post links
    • Map links
    • Video rooms
  • Webhooks
    • General
    • Authentication
    • File upload
    • Users
    • Invites
    • Tickets
    • Vendors
      • Create
      • Update
      • Delete
    • COMING SOON: Announcements
    • COMING SOON: Lectures
    • Map Data
      • Map layer
      • Map features
      • Update references
  • COMING SOON: Chat Bots
  • Wordpress Plugin
    • Installation
    • Pages
    • Shortcodes
      • Filters
      • Optional settings
    • Routing
    • Configuration
  • Javascript plugin
    • Introduction
    • Installation
      • Initial page
      • Filters
      • Optional settings
    • Routing
    • Configuration
  • Single Sign-On
    • OAuth2 Login
    • Website data
    • OAuth2 Flow
      • Request an Authorization Code
      • Exchange for Access Token
      • Authorized Requests
  • SELF-SERVICE LINKS
    • Event Ticket Token
  • Old Wordpress Plugin
    • Download
    • Pages
    • Shortcodes
    • Filter Options
    • Style Options
  • Old Javascript Plugin
    • Introduction
    • Routing
    • Installation
  • Troubleshooting
    • Firewall Configuration
  • Talque Plugin
    • Download
    • Installation
    • Configuration
Powered by GitBook
On this page

Was this helpful?

  1. Webhooks

File upload

Some APIs require you to upload binary data, like images or documents. In order to efficiently transfer such additional data we do not embed them in the JSON request body, but provide a separate API to only upload the binary data. This API returns a temp file identifier, which you can then use to refer to the file in the JSON request body of subsequent API calls.

The returned temp file id expires after one week, so you should not store it in your database but only use for immediate API calls.

In order to upload a binary file you have to make two HTTP requests. First, create a signed upload URL:

Create a new temp file identifier

POST https://www.talque.com/webhook/file/temp/create

Create a new temp file id and associated signed upload URL. This API call requires authentication as described in the Authentication section.

Body

There is no input, so the request body is an empty {} object.

Response

{
    "tempFileId": "NL3bI9SZBaEalxdIpre4", 
    "uploadUrl": "https://storage.googleapis.com/...", 
    "success": true, 
    "reasonEnum": "CreateTempFileWebhookReason", 
    "reason": "SUCCESS"
}
{
  "error": "Invalid request"
}

The returned value is a JSON dictionary that includes the tempFileId and uploadUrl. The second and final step is to upload the file content to the provided upload URL with a HTTP PUT request. For example, on the command line this could be done with the CURL command

curl -v --upload-file test.pdf 'https://storage.googleapis.com/...'

After the upload completes you can start using the temp file id in subsequent API calls.

PreviousAuthenticationNextUsers

Last updated 9 months ago

Was this helpful?