Send requests directly to an integration provider, on behalf of Connected Users.
paragon.request
to send an API request to a third-party app on behalf of one of your Connected Users.
Along with Workflows, the Proxy API is one of two primary ways to build integrations with Paragon.
paragon.request
, which takes three arguments:
integrationType
: The short name for the integration. i.e. “salesforce” or “googleCalendar”. You can find this string on the Overview tab of the integration you want to access, on your Paragon dashboard.
integrationType
name is prefixed with "custom."
For example, a custom integration titled “TaskLab” would be called "custom.tasklab"
.path
: The path (without the hostname) of the API request you are trying to access. An example might be “/v1/charges” for Stripe’s charge API or “chat.postMessage” for Slack’s Web API.requestOptions
: Request options to include, such as:
body
: An object representing JSON contents of the request.method
: An HTTP verb such as “GET” or “POST”. Defaults to GET.https://proxy.useparagon.com
https://worker-proxy.
[your on-prem host name]/projects/<Project ID>/sdk/proxy/<Integration Type>/<API Path>
/projects/<Project ID>/sdk/proxy/custom/<Integration ID>/<API Path>
for Custom Integrations.application/json
.
X-Paragon-Use-Raw-Response
header to the request.
This can be used when downloading binary/file data, such as images or PDF files, where the response cannot be encoded as JSON.
The JavaScript SDK currently does not support returning non-JSON payloads. As an alternative, you can use your preferred request client to make the below API request.
Below is an example of using the Proxy API to download a file from Google Drive using their files.get
endpoint.
https://sheets.googleapis.com/v4/spreadsheets
.