Open depesz opened 1 year ago
Can you try this again and add this immediately after creating $spotify
$spotify->force_client_auth(1);
@depesz oauth is managed by the module and Spotify changes which end points are behind it so please try the recommendation provided above and let me know if that resolves your issue.
I did:
use WWW::Spotify;
my $spotify = WWW::Spotify->new();
$spotify->oauth_client_id('07394b9ae3824d3e840dc052786936cd');
$spotify->oauth_client_secret('...');
$spotify->force_client_auth(1);
my $result = $spotify->search(
'lana del rey' ,
'artist' ,
{ limit => 15 , offset => 0 }
);
print Dumper($result);
And it seemed to work, as in: it shows me some results.
Which is great, but how can I make it get access (over oauth) to my own private playlists, or to modify playlists?
@depesz you might want to edit your secret out of that example?
Heh. Thanks @oalders . Also disabled the keys, just in case.
Hi. I'm trying to write cli tool to do some stuff in spotify, but I can't get it to work.
Even the first example from doc:
gives me error:
I do have client id/secret from developer.spotify.com, but search in docs only found oauth_client_id and oauth_client_secret, and when i used them:
I still got "No token provided"?
I know that as some point in time i will need to handle oauth to get access to read write access to playlists, but searching for stuff should work without it? Or should I bite the bullet and work with oauth. But in such case: how?