Client Actions
Client Actions are specially formatted strings that are sent under the client_action
field in CardKit buttons. They allow a button to perform special actions within the Blink app.
Below is a list of available client actions.
Open Webview
blink:webview?
This client action causes a webview to open allowing the user to view a webpage without leaving the Blink app.
Field | Description | Required |
---|---|---|
url | URL encoded Base64 Encoded URL | Yes |
action |
| Yes |
id | Used to prevent opening multiple webviews with the same id on the Desktop app. | No |
Example
This example opens the timeline microapp.
blink:webview?url=aHR0cHM6Ly9jb250ZW50LmpvaW5ibGluay5jb20vIy90aW1lbGluZQ%3D%3D&action=open&id=timeline
Open Link
blink:link?
This client action opens a link in an external web browser.
Field | Description | Required |
---|---|---|
url | URL encoded Base64 Encoded URL | Yes |
action |
| Yes |
Example
This example opens the Blink website.
blink:link?url=aHR0cHM6Ly9qb2luYmxpbmsuY29tLw==&action=open
Send HTTP POST Request
blink:post?
This client action allows you to send a post request to the connector proxy url for your integration. It is a powerful client action as it allows buttons on cards to perform arbitrary actions in your integration.
Field | Description | Required |
---|---|---|
url | URL encoded Base64 Encoded URL. This is just the path and will be prefixed by the app with | Yes |
body | URL encoded Base64 Encoded JSON body. | Yes If you don't need to send a body just send |
Example
This example posts the JSON {"test":"body"}
to https://api.joinblink.com/connector/l-a26dab83-33a1-459b-adab-8333a1259b7d/test
blink:post?url=L2Nvbm5lY3Rvci9sLWEyNmRhYjgzLTMzYTEtNDU5Yi1hZGFiLTgzMzNhMTI1OWI3ZC90ZXN0=&body=eyJ0ZXN0IjoiYm9keSJ9
Updated over 3 years ago