The proxy endpoint allows Blink to send requests to your integration's code via an HTTP request. Calls to the proxy endpoint can be initiated in three ways, by users clicking buttons on cards your integration has sent, user's clicking the 'Connect' button on the page for your integration on the 'Manage Integrations' page or users clicking the 'Disconnect' button on the same page. (For more information about how to implement HTTP endpoints for requests sent by the 'Connect and 'Disconnect' buttons please read Building Authenticated Integrations).
All integrations have a service id. This is shown on the management page for your integration
On the integrations management page, you will also see you can specify a 'Proxy URL' and 'Proxy Secret'.
Any request to the Blink API that has the URI
/connector/<service_id> will be forwarded to the Proxy URL specified. Any part of the URI after
/connector/<service_id> will be appended to the Proxy URL.
For example, if your integration had the Service Id above, and you wanted to hit an endpoint in your integration with the URI
/sale/123?action=closed you would send an HTTP request to:
If your Proxy URL was, for example,
https://myintegration.myapi.mysite.com, we would forward any body and headers from your request to:
As any API you that you want to proxy requests to via Blink needs to be publicly accessible, we allow you to specify a 'Proxy Secret'. We send this secret as a header with the key
blink-auth-proxysecret with every request we proxy to your proxy url. You can then verify that any request to your endpoints includes the secret you specified to validate that it is a valid proxied request from Blink.
So you know who performed the action that triggered the proxied request, every proxied request includes a
blink-auth-userid header. This contains the user id of the user who initiated the request.
The main use case for the proxy url is allowing users of your integration to perform actions in some system external to Blink.
For example, the buttons section specified in the JSON below sends a POST request
/connector/l-13c68b6e-9c6f-41c5-868b-6e9c6f91c59a/holiday-requests/2346?action=approve. This would then get proxied to
"label":"Post Request Button With Body",
Using this, you could easily make an integration that sends feed events about employees requesting employee leave to a manager. The manager could click a button on these events to approve or reject the annual leave requests without leaving Blink.