I think you might want to declare your dependency with api configuration?
api("se.michaelthelin.spotify:spotify-web-api-java:9.2.0")