R Interface to the Pushbullet Messaging Service

An R interface to the Pushbullet messaging service which provides fast and efficient notifications (and file transfer) between computers, phones and tablets. An account has to be registered at the site < https://www.pushbullet.com> site to obtain a (free) API key.

R interface to Pushbullet

Pushbullet is an awesome (and still free for a very useful set of features with additional premium service for extras) service to pass messages between your computer(s), phone(s) and tablet(s). It offers immediacy which is perfect for alerting, and much more.

To use it, first register to obtain an API key from the Pushbullet site, and maybe install the Android or iPhone app, or one of the supported browser extension or desktop applications. See the Pushbullet documentation for more information and details.


With a resource file (see below) properly setup, you can just do something like the following

R> msg   # just an example, can be driven by real simulation results  
[1] "DONE after 10000 simulations taking 42.43 minutes reducing RMSE by  7.89 percent"  
R> RPushbullet::pbPost("note", title="Simulation complete", body=msg)  
R> pbPost("note", title="Simulation complete", body=msg)  

and a message like the image following below should pop up (if messaging directed to the browser):

Another excellent use case was suggested years ago by Karl Broman in this blog post. We can improve on his version a little as one no longer needs to load the package:

options(error = function() { 
    RPushbullet::pbPost("note", "Error", geterrmessage())
    if(!interactive()) stop(geterrmessage())

There was one noteworthy follow-up for which I lost the source: it suggested to make the message somewhat saltier by relying on the helpful rfoaas package.

Package Status

The package is reasonably mature and functional.

Up until release 0.2.0, an external curl binary was used. We have since switched to using the curl package.

Given that the Pushbullet API has other nice features, future extensions are certainly possible and encouragement. Interested contributors should file issue tickets first to discuss before going off on pull requests.


A file ~/.rpushbullet.json can be used to pass the API key and device identifiers to the package. The content is read upon package startup, and stored in a package-local environment. The format of this file is as follows:

    "key": "...placey your api key here...",

    "devices": [ 
        ".....device 1 id......",
        ".....device 2 id......",
        ".....device 3 id......"

    "names": [

    "defaultdevice": "...nameOfYourDefault..."

The names and defaultdevice fields are optional. See the main package help page for more details.

You can also create the file programmatically via

cat(jsonlite::toJSON(list(key="..key here..", devices=c("..aa..", "..bb.."))))

and write that content to the file ~/.rpushbullet.json.

Starting with release 0.3.0, a new helper function pbSetup() is also available to create the file.

You can also retrieve the ids of your devices with the pbGetDevices() function by calling, say, str(fromJSON(pbGetDevices())). Note that you need to load one of the packages RJSONIO or rjson or jsonlite to access the fromJSON() function.


Pushbullet has recently added channels to their API. These are notification feeds that user can subscribe to, and which allows the developer to create (per-topic) channels for various applications / topics that her users can subscribe to.

Creating a channel is easy: one simply needs to login and visit the My Channel page. From there, one can easily create a new channel by clicking the "add channel" button. There will be a prompt to enter a 'tag', a channel name, as well as a description. The channel_tag is what is needed to push posts to the channel. Currently, only the owner of a channel has permissions to post to that channel, so one will need to create the channel using the same login one has specified in ~/.rpushbullet.json in order to use RPushbullet to post to a channel.

Channels are public: Anyone who knows the channel 'tag' can subscribe and will therefore receive all messages pushed to that channel. Some users create hard-to-guess channel tags to achieve semi privacy. This works because it is, currently as of February 2015, neither possible to list the channels owned by a specific user nor possible to browse or search for other users' channels. One method to generate a hard-to-guess tag is digest::digest(rnorm(1)).

Channels can be used by passing a channel argument to the pbPost function. The Pushbullet API identifies a channel via the supplied channel_tag value of this argument. See the Pushes API documentation for more information.


Dirk Eddelbuettel with contributions by Bill Evans, Mike Birdgeneau, Henrik Bengtsson, and Seth Wenchel


GPL (>= 2)


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.4 by Dirk Eddelbuettel, 8 months ago

Browse source code at https://github.com/cran/RPushbullet

Authors: Dirk Eddelbuettel with contributions by Bill Evans , Mike Birdgeneau , Henrik Bengtsson , Seth Wenchel , Colin Gillespie and Chan-Yub Park

Documentation:   PDF Manual  

Task views: Web Technologies and Services

GPL (>= 2) license

Imports utils, stats, jsonlite, curl

System requirements: A user API key (which one can request from the website at <http://www.pushbullet.com>), and one or more devices to push messages to which may be any one of an (Android or iOS) phone, a (Chrome or Firefox, or Opera or Safari) browser or the (Windows or Mac) desktop application provided the corresponding Pushbullet 'app' has been installed on any one of these.

Imported by CoTiMA, SimDesign.

Suggested by lgrExtra, logger.

See at CRAN