Access Spotify API via ddev php [closed]

20 hours ago 2
ARTICLE AD BOX

I have a local PHP file which should connect to the Spotify API and fetch a track.
I run it via ddev exec php. In this case, the response is always 403, Forbidden.

If I just open the PHP file in my browser with
mysite.ddev.site/myfile.php the request goes through.

Is there any limitation I am not aware of? I tried to debug with Claude Code for quite a while, but had no success. The configs look pretty much the same, the api.spotify.com resolves to the same IP.
I authorized and saved refresh token and access_token and it has not expired.

I have no idea what to do next.

Dharman's user avatar

Dharman

34.1k27 gold badges105 silver badges157 bronze badges

Merc's user avatar

4

Read Entire Article