node package manager



NodeJS module to use the API. Currently only authentication and the Storyline endpoint is supported. For more information about the API please refer to the official documentation.


var movesApi = require('moves-api').MovesApi;
var moves = new movesApi({
    "clientId": "ClientId",
    "clientSecret": "ClientSecret",
    "redirectUri": "RedirectUri",
    "accessToken": "",
    "refreshToken" : "",
// Redirect your user to this url 
var url = moves.generateAuthUrl();
moves.getAccessToken(code_from_redirect, function(err, authData) {
    moves.options.accessToken = authData.accessToken;
    moves.getProfile(function(err, profile) {

For more usage examples take a look at the tests or Elizabeth, my script to export your data, which uses this module. Surprise!



Generates the URL the user needs to visit to start the authentication. scope should be an array of the scopes needed (location, activity)

MovesApi#getAccessToken(code, cb)

If provided with the access code given back from the API this will get you the access token to use for the other requests. The callback should be a function(err, accessToken) {}.


Verifies the configured access token. The callback should be a function(err) {}.


Returns the profile of the authenticated user. The callback should be a function(err, profile) {}.

MovesApi#getStoryline(options, cb)

Returns storylines! options may just be a string identifying a single day (20130401) or an object to specify a date range or include the trackPoints: { from: "20130401", to: "20130405", trackPoints: false}.


Feel free to contribute and add the other API endpoints! :)