#!/usr/local/bin/perl -w use strict; use lib 'lib'; use OAuth::Cmdline; use OAuth::Cmdline::Mojo; my $oauth = OAuth::Cmdline->new( client_id => "XXX", client_secret => "YYY", login_uri => "https://accounts.spotify.com/authorize", token_uri => "https://accounts.spotify.com/api/token", site => "spotify", scope => "user-read-private", ); my $app = OAuth::Cmdline::Mojo->new( oauth => $oauth, ); $app->start( 'daemon', '-l', $oauth->local_uri );