x-callback-url API Documentation

Unleash the power of Command-C by using x-callback-url, the only limit is your imagination.

The x-callback-url standard is a powerful way to combine functionalities of different apps into a single piece of unit called workflow. Every app that provides x-callback-url support, registers a URL scheme which could be used to call actions on it and pass data between apps ( sometimes referred as inter-app comunication ). Command-C provides three different actions which can be used to share clipboards to your device, open URLs or even combine workflows between different devices.

Copy action

Copy is the basic action to share the current clipboard content to another device.

command-c://x-callback-url/copy?x-source=SourceApp&x-success={{sourceapp://}}&x-error={{sourceapp://}}&deviceName=SomeDevice

For example, to copy the current clipboard to a device named Danilo’s Macbook Pro.

command-c://x-callback-url/copy?deviceName=Danilo%27s%20MacBook%20Pro

Or if you prefer to use the device index ( assuming the Macbook Pro is the first device )

command-c://x-callback-url/copy?deviceIndex=0

Parameters

  • x-source: The friendly name of the source app calling the action.
  • x-success: The url to be called when the clipboard sharing has been succeed.
  • x-error: The url to be called when the clipboard sharing has been failed.
  • deviceName : The encoded name of the device receiving the action.
  • deviceIndex : If name could not be encoded, you can choose the device by using its index. For example the first device will have index 0, the second will have index 1 and so on.

For x-source, x-success and x-error documentation see also the x-callback-url specification.


Copy text action

Copy text action is a way to share a given text value to another device without having to using the system clipboard. For example can be used in a browser snippet to share the current web page address.

command-c://x-callback-url/copyText?x-source=SourceApp&x-success={{sourceapp://}}&x-error={{sourceapp://}}&deviceName=SomeDevice&text=SomeTextValueToCopy

For example to copy the 'Hello World' value to a device named Danilo's iPhone

command-c://x-callback-url/copyText?text=Hello%20World&deviceName=Danilo%27s%20iPhone

Parameters

  • x-source: The friendly name of the source app calling the action.
  • x-success: The url to be called when the clipboard sharing has been succeed.
  • x-error: The url to be called when the clipboard sharing has been failed.
  • deviceName : The encoded name of the device receiving the action.
  • deviceIndex : If name could not be encoded, you can choose the device by using its index. For example the first device will have index 0, the second will have index 1 and so on.
  • text: The text to be sent to the device. Must be properly encoded if needed.

For x-source, x-success and x-error documentation see also the x-callback-url specification.


Copy and Open URL action

Copy and Open URL lets you share a given URL to another device which will open it automatically. Action available only when the receiver is a Mac.

command-c://x-callback-url/copyAndOpenURL?x-source=SourceApp&x-success={{sourceapp://}}&x-error={{sourceapp://}}&deviceName=SomeDevice&url={{http://}}

For example, to copy and open the Apple web page on a device named Danilo's Macbook Pro

command-c://x-callback-url/copyAndOpenURL?url=http%3A%2F%2Fwww.apple.com&deviceName=Danilo%27s%20MacBook%20Pro

Parameters

  • x-source: The friendly name of the source app calling the action.
  • x-success: The url to be called when the clipboard sharing has been succeed.
  • x-error: The url to be called when the clipboard sharing has been failed.
  • deviceName : The encoded name of the device receiving the action.
  • deviceIndex : If name could not be encoded, you can choose the device by using its index. For example the first device will have index 0, the second will have index 1 and so on.
  • url: The url to be opened on the device. Could be any URL Scheme available on the receiver. Must be properly encoded if needed.

For x-source, x-success and x-error documentation see also the x-callback-url specification.