-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
Describe the bug
When making a request with Market.FROM_TOKEN, the request will fail with SpotifyException.BadRequestException due to an HTTP 400 error.
To Reproduce
Steps to reproduce the behavior:
- Call an endpoint that takes in a market parameter, specifying
Market.FROM_TOKEN. For example:
spotifyClientApi.browse.getRecommendations(market = Market.FROM_TOKEN, seedTracks = listOf(/* any track IDs */))SpotifyException.BadRequestExceptionis thrown, with error code 400.
Expected behavior
A successful response from the endpoint, providing content (such as recommended tracks) relevant to the user's current market/country (pulled from their auth token).
Smartphone (please complete the following information):
- Device: OnePlus 7 Pro
- OS: Android 11
- Browser: Native Android app
- Version: library version 3.8.8
Additional context
The 400 error is happening because the market parameter is resolved by getting the enum name, which is FROM_TOKEN. However, this is not a valid Spotify market -- it should be from_token in all lowercase instead.