C2W2 403 Forbidden Error in Spotify API Assignment (Featured Playlists)

Problem:
I am consistently receiving a 403 Forbidden error when trying to access the Featured Playlists endpoint, even with valid credentials.

Error Message:

{'error': {'status': 403, 'message': 'Forbidden'}}

Context:

  • Target URL: https://api.spotify.com/v1/browse/featured-playlists

  • Validation: I have verified that my access_token is correct and active.

  • Suspected Cause: I suspect this is related to the recent 2024/2025 Spotify API policy changes that restricted “Browse” endpoints for new developer applications.

Question:
Since this endpoint appears to be restricted by Spotify for new apps, is there a specific workaround for this assignment? Should I be using a different endpoint (like the Search API), or is there a way to grant my app “Extended Mode” access to complete the lab as written?

Help would be greatly appreciated. Thank you!


I have the same problem here. I tested my pipeline with “https://api.spotify.com/v1/albums/4aawyAB9vmqN3uQ7FjRGTy” and it worked, but with the provided url (https://api.spotify.com/v1/browse/new-releases) I got the 403 error

I guess we need to wait for someone form the Staff to resolve this issue.

@magdalena.bouza, can you check into this?

@thrinaibatchu @Evrad_DEUTOU Yes, it’s Spotify’s policy changes.
We will have to wait for the tech team’s help.

Hi all! A couple of months back we deployed a patch with a mock API so that you can still run the lab. Please make sure to run the first code cell of the notebook to import the necessary functions.

We are working on creating a new lab that no longer relies Spotify, but in the meantime please use the patch so that you are not blocked by this lab, and you can still get the experience of working API requests.

Cheers,
Magdalena

Where is this “mock-id” and “mock-secret”? I am unable to find it in src/env. I have CLIENT_ID=7d2e74eb9ffc45ae9796ede5c078478c
CLIENT_SECRET=f0b2f9aba5124203ac46e91b4f8c93b3
AAP_NAME=spotify-app in my src/env which I have defined it. But it won’t work because of Spotify Policy. Today is the last day of submitting my assignment and last day of this course. Please check it otherwise I won’t be able to get certificate.

Hi @Priyanka12 just replace your current CLIENT_ID with the phrase mock-id, and CLIENT_SECRET with the phrase mock-secret.