Announcements

Help Wizard

Step 1

NEXT STEP

404 when trying to access streams

404 when trying to access streams

Plan

Free

Country

UK

 

Device

MacBook Air (Retina, 13-inch, 2020)

Operating System

Monterey 12.4

 

My Question or Issue

 

Hi there

 

I've been successfully accessing the audio-features part of the API, but trying to access the streams I'm getting a 404. I have provider access, so not sure what I'm doing wrong. I am quite new to this though, so may well be something rudimentary!

 

Thanks

 

Here's part of my code, have substituted the keys, url and uri

 

CLIENT_ID='<id>'
CLIENT_SECRET='<secret>'


AUTH_URL = '<url>'

 

auth_response = requests.post(AUTH_URL, {
'grant_type': 'client_credentials',
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
})

 

auth_response_data = auth_response.json()

 

access_token = auth_response_data['access_token']

 

authheaders = {
'Authorization': 'Bearer {token}'.format(token=access_token)
}

 

r = requests.get('<url><uri>', headers=authheaders)

 

 

 

 

 

 

Reply
5 Replies

Hi @Anne20,

 

Welcome to the community and thanks for sharing a code sample 🙂

 

Could you elaborate on what you meant by access the streams? Which API endpoint are you are looking to access?

Hi @spotifyjosh

 

I wasn't sure what I should be sharing, it's the aggregated endpoint from the private documentation. Am I ok to share it here?

 

Thanks!

 

 

Hey @spotifyjosh

Just wondering if you had any more info? Thanks!

Hi @Anne20, ok, could you send me an email? Please copy your Spotify contact if you have one and we'll go from there 🙂 My email address is jbrown@spotify.com

Hey Josh

Tried that email, just making sure that's the best way to follow up. Cheers!

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random