[GH-ISSUE #1003] Skip ssl certificate chain validation for spotipy client #598

Closed
opened 2026-02-28 00:00:01 +03:00 by kerem · 2 comments
Owner

Originally created by @gianlucasquarcia on GitHub (Jul 20, 2023).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1003

Hi guys,
I'm using the spotipy client like this

def get_spotipy_client():
        scope = "user-read-playback-state,user-modify-playback-state"
        sp = spotipy.Spotify(
            auth_manager=SpotifyOAuth(
                scope=scope,
                client_id=CLIENT_ID,
                client_secret=CLIENT_SECRET,
                redirect_uri=REDIRECT_URI,
            )
        )

        return sp

and then somewhere

...
results = sp.current_user_playing_track()
...

Unfortunately i'm behind a corporate proxy and i'd like to disable the ssl certificate chain validation in the call but the verify boolean is not exposed. Is there any future plan to add it as optional or something?

Thanks in advance, love your library!

Originally created by @gianlucasquarcia on GitHub (Jul 20, 2023). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1003 Hi guys, I'm using the spotipy client like this ``` def get_spotipy_client(): scope = "user-read-playback-state,user-modify-playback-state" sp = spotipy.Spotify( auth_manager=SpotifyOAuth( scope=scope, client_id=CLIENT_ID, client_secret=CLIENT_SECRET, redirect_uri=REDIRECT_URI, ) ) return sp ``` and then somewhere ``` ... results = sp.current_user_playing_track() ... ``` Unfortunately i'm behind a corporate proxy and i'd like to disable the ssl certificate chain validation in the call but the verify boolean is not exposed. Is there any future plan to add it as optional or something? Thanks in advance, love your library!
kerem 2026-02-28 00:00:01 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@stephanebruckert commented on GitHub (May 19, 2025):

Hi @gianlucasquarcia, we could add that. Any chance you can create a PR for it? Thanks!

<!-- gh-comment-id:2892005801 --> @stephanebruckert commented on GitHub (May 19, 2025): Hi @gianlucasquarcia, we could add that. Any chance you can create a PR for it? Thanks!
Author
Owner

@stephanebruckert commented on GitHub (May 19, 2025):

After discussing with @dieser-niko, looks like you could just pass a session with verify=False:

import requests
from spotipy import Spotify, SpotifyClientCredentials

session = requests.Session()
session.verify = False

sp = Spotify(
    auth_manager=SpotifyClientCredentials(),
    requests_session=session
)

Closing as this issue is old, but feel free to re-open if you have any questions

<!-- gh-comment-id:2892167611 --> @stephanebruckert commented on GitHub (May 19, 2025): After discussing with @dieser-niko, looks like you could just pass a session with `verify=False`: ``` import requests from spotipy import Spotify, SpotifyClientCredentials session = requests.Session() session.verify = False sp = Spotify( auth_manager=SpotifyClientCredentials(), requests_session=session ) ``` Closing as this issue is old, but feel free to re-open if you have any questions
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#598
No description provided.