Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 403 #4

Open
ElvinGomez opened this issue Jan 29, 2021 · 2 comments
Open

Error 403 #4

ElvinGomez opened this issue Jan 29, 2021 · 2 comments

Comments

@ElvinGomez
Copy link

ElvinGomez commented Jan 29, 2021

I am getting
{ error: { status: 403 } }

And this:
(node:9542) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined at /Users/quantime/Documents/GitHub/WhatsappBot/node_modules/sactivity/js/SpotifyClient.js:101:93 at Array.reduce (<anonymous>) at SpotifyClient.resolve (/Users/quantime/Documents/GitHub/WhatsappBot/node_modules/sactivity/js/SpotifyClient.js:101:52) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async SpotifyClient.resolveURI (/Users/quantime/Documents/GitHub/WhatsappBot/node_modules/sactivity/js/SpotifyClient.js:104:31)

@EricRabil
Copy link
Owner

Can you show me your code?

@ElvinGomez
Copy link
Author

I copied and paste your test, then search the cookie in the request header that contains a long string with some values like this:
sp_m=; spot=; _ga=; sp_adid=; _pin_unauth=; _scid=; sp_dc=; sp_key=; ki_t=; _derived_epik=; &datestamp=&version=6.12.0&hosts=&consentId=&interactionCount=1Path=NotLandingPage&groups==false; sp_phash=; sp_gaid=; sp_ab=; sp_t=; _gcl_au=; sp_last_utm=; sp_landing=; sp_usid=

`import Sactivity, { SpotifyTrackAnalyzer } from 'sactivity';

const sactivity = new Sactivity("cookie");
sactivity.connect().then(socket => {
const analyzer = new SpotifyTrackAnalyzer(socket);

analyzer.on('beat', beat => {
console.log(beat);
});

socket.on('track', async track => {
});
}).catch(e => {
console.error('Failed to connect to the dealer daddy');
console.error(e);
});`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants