Push for Ubuntu

Caxton handles push notifications for all your Ubuntu apps.

Read More

Built for users

Send anything to your Ubuntu phone with IFTTT or from your browser.

Easy for developers

Use the Caxton API to add push to your desktop apps or your server scripts.

Read More

You need Caxton. Your apps do too.

Get it now

For users

Install Caxton on your Ubuntu phone and then send messages to any Ubuntu app through it. You can use Caxton to send web pages to your phone from any browser, or send notifications from IFTTT to your phone, or anything else with Caxton integration.

For developers

Use the Caxton API to send any URL to your phone apps. You could integrate push sends into your desktop apps, send messages from your scripts to your phone, or make an easy way for desktop users to send content to your phone apps via custom URLs.

Explore the API

Send web pages to your Ubuntu phone from any browser

Download the Caxton extension for Chrome, Firefox, or Opera.

  1. Press the Caxton button in your browser
  2. When it asks for a code, press Get a code for an app in the Caxton app on your phone to get a code
  3. Enter the code into your browser

Now your desktop browser and your phone are paired: press the Caxton button to send URLs to your phone!

Alternatively, if you don't want to install the extension you can create yourself a Caxton bookmarklet:

Add the Caxton bookmarklet

Press the Get a code button in Caxton on your Ubuntu device and then enter the code in the box on the right.

You'll then get a bookmarklet: a button which acts like a tiny browser extension. Drag it to your bookmarks bar and then click it when viewing any website to send that website to your phone!

Drag the orange button to your bookmarks bar.

Send IFTTT notifications to your Ubuntu phone

IFTTT is a really popular way to connect together internet services; you can have it send a message and a URL to your Ubuntu phone when something happens, where something is you being tagged in a photo on Facebook, a parcel you're expecting being shipped, a github repository you care about being changed, a stock you're watching reaching a limit, and nearly 200 other things. IFTTT doesn't directly support Caxton yet, but you can make it work anyway with a bit of a hack!

First, get a Caxton password for IFTTT

Press the Get a code button in Caxton on your Ubuntu device and then enter the code in the box on the right.

I've already done this; show me how to use it.

Next, activate the IFTTT WordPress channel

Sign in to IFTTT (or sign up), and then choose WordPress from the Channels page and Activate, or go directly to it here.

  1. In Blog URL enter caxton.herokuapp.com
  2. In Username enter ifttt
  3. Copy your IFTTT Caxton password from below and paste it into the Password box
  4. Hit Activate

Your IFTTT Caxton password

Note: it's important that you enter everything correctly. The username must be ifttt in lower case, and the IFTTT Caxton password must be pasted correctly.

Finally, send URLs to your phone with IFTTT recipes

Create a recipe on IFTTT, and use WordPress as your Action when something is triggered. Choose Create a post in the WordPress Action, and then in Complete Action Fields fill in as follows:

  • In Title, add the URL you wish to send to any app via Caxton. You can use any IFTTT "variables" here that you choose.
  • In Body, add the message that you wish to accompany the URL. You can use IFTTT variables here too, and you can leave it blank to just send the URL if you prefer.
  • Leave Categories and Tags blank and Post Status at Publish Immediately (anything you enter will be ignored)

You can then Create Action and your IFTTT recipe will now run as often as you specify, and send messages and URLs through Caxton on your Ubuntu phone whenever something happens!

Get the Caxton app for your Ubuntu phone.

Download it now

Caxton API

Developers can use the Caxton API directly to send URLs to their Ubuntu phone via Caxton.

Get a token

Ask the user to press the button in the Caxton phone app and then enter the code it gives. POST that code and your app's name to /api/gettoken to get a token. Save the token to use in future send requests. You only need to do this once.

Code

curl -X POST \
 -d "code=abcde&appname=My%20app%20name" \
 https://caxton.herokuapp.com/api/gettoken

Content-type: application/json
{"token": "lcaw...aspof"}
                            

Send a notification

POST to /api/send with required parameters url, appname, and token and any optional parameters from below. Your URL will be sent to Caxton and opened on the phone in whichever application handles it. For an HTTP URL, this will be the web browser, but you can send any URL you choose, including app-specific URLs to open a different app.

Code

curl -X POST \
 -d "appname=My%20app%20name" \
 --data-urlencode "token=lcaw...aspof" \
 -d "url=http://kryogenix.org" \
 https://caxton.herokuapp.com/api/send

Content-type: application/json
{ok: "Ok"}
                            

Note that we use --data-urlencode to pass the token with curl so that any + symbols in the token are not treated by curl as escaped spaces.

Required notification parameters

url
A URL to open on the target device.
appname
The app name for which your token was registered.
token
The token returned from /api/gettoken.

Optional notification parameters

message
A message to be shown in an on-screen notification on the device, and saved with the URL for later access in the Caxton app.
count
A number to use in a badge on the Caxton icon.
sound
The name of a sound to play on the device when the notification arrives. Choose from the following: (not yet specified, apologies.)
tag
A grouping for notifications; if this is specified, a newer notification with the same tag will override the previous one. See the push notifications server guide for details.

You need Caxton. Your apps do too.

Get it now