Google Drive picker

Google Drive picker allows you to access files stored in a Google Drive account. You can find more information about this one the official page.

Adding a new source file of type gdrive_picker is done by using the following parameters:

  • type
    • Specifies that the Google Drive picker is used as an input
  • source:
    • Must contain the "FILE ID" given back by the Google Drive picker
  • credentials:
    • Must be an array containing the credentials for the selected file
    • At the moment, only the "token" field inside it is required
    • The "token" field is returned by the Google Drive picker when a file is selected
  • content_type:
    • Mandatory when selecting a Google Document
    • Can be left empty if selecting any other kind of file (e.g. pdf, png, zip, ...)
  • filename:
    • The file name of the Google Drive picker file
    • If this field is not sent, the file will be downloaded using the name "output"
POST /jobs HTTP/1.1
Host: https://api2.online-convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json

{
    "input": [{
        "type": "gdrive_picker",
        "source": "put google drive picker file id here",
        "credentials": {
            "token": "put google drive picker token for the selected file here"
        },
        "content_type": "if this is a specific google document",
        "filename": "name of the input file"
    }],
    "conversion": [{
        "target": "png"
    }]
}
curl -X POST \
    https://api2.online-convert.com/jobs \
    -H 'cache-control: no-cache' \
    -H 'content-type: application/json' \
    -H 'x-oc-api-key: <your API key here>' \
    -d '{
            "input": [{
                "type": "gdrive_picker",
                "source": "put google drive picker file id here",
                "credentials": {
                    "token": "put google drive picker token for the selected file here"
                },
                "content_type": "if this is a specific google document",
                "filename": "name of the input file"
            }],
            "conversion": [{
                "target": "png"
            }]
        }'

results matching ""

    No results matching ""