Announcements

reCaptcha throwing uncaught (in promise) null error when using Spotify accounts API locally

Reply
Highlighted

reCaptcha throwing uncaught (in promise) null error when using Spotify accounts API locally

Newbie

Plan

Premium

Country

United Kingdom (England)

 

Device

MacBook Pro (Retina, Mid 2012)

Operating System

macOS Catalina 10.15.7

 

My Question or Issue

Hi,

 

I've recently started using the Spotify API and have followed these guides in order to get my app set up: https://developer.spotify.com/documentation/web-api/quick-start/ & https://developer.spotify.com/documentation/general/guides/authorization-guide/

 

I'm correctly firing off a request to the accounts API and being given the option to sign in:

4chfkz_w0-11a_0-1602427441654.png

 

However I get this instead of a reCaptcha:

4chfkz_w0-11a_1-1602427484078.png

 

And this is the error that gets thrown when I try and log in:

4chfkz_w0-11a_2-1602427569163.png

 

I also tried using ngrok so that it wouldn't use localhost as the domain for the reCaptcha but that also didn't work.

 

Is there a way to disable the reCaptcha? Such as some kind of development mode? Or are there specific development environment APIs that I should be using?

 

Thanks!

1 Reply
Highlighted

Re: reCaptcha throwing uncaught (in promise) null error when using Spotify accounts API locally

Rock Star 16
Rock Star 16

Hey @bonkie, help's here!

For security reasons, it's not possible to disable ReCaptcha on the Spotify login page. Your authorization flow is not supported at this moment.

 

The user sign-in part of the authorization should always be done on the authorize-endpoint of the accounts service (https://accounts.spotify.com/authorize) and can't take place on your own server/domain. After successful authentication, you can redirect back to the pre-defined 'callback'-uri of your app where you'll receive the token you can use to access the API with.

 

Let me know if you have any further questions!

 

Have a good one,

Hubo

HuboRock Star 16
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.
SUGGESTED POSTS