Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Please see below the most popular frequently asked questions.
Loading article...
Loading faqs...
Please see below the current ongoing issues which are under investigation.
Loading issue...
Loading ongoing issues...
Plan
Premium
Country
US
Device
pixel 7 pro
Operating System
Android 14
My Question or Issue
I am trying to create an API using either Autoweb, or an https put, to change the state to Repeat All. I have been unable to get it to work and I am hoping someone can help me.
Hi spookiekabuki,
It sounds like you're working on creating an API with either AutoWeb or an HTTPS PUT request to change the repeat mode. Could you share what youโve tried so far? Iโd love to help you figure out whatโs going wrong and get it working smoothly.
To change the repeat mode for a user's playback, you can use the Set Repeat Mode endpoint. Just a heads-upโthis API is available only for Spotify Premium users.
Here's how the different repeat modes work:
Let me know where youโre at with your setup, and weโll work through it together to get your repeat mode set just the way you want it.
Full disclosure, I do not know what I'm doing. How familiar with Autoweb are you? I can send a set-up screenshot or I can try to tack state onto an existing call like a get info call, but I do not know what components I need to make it work.
HTTPS PUT might just be easier if all I need to do is craft the proper URL?
Hi spookiekabuki,
I used the Brows Web Services function to add the Spotify API.
After that, I went to Your Web Services โ Spotify โ the + next to API Actions.
I choose for the offered help, and filled in https://api.spotify.com/v1/me/player/repeat?state=context as the URL. Then I said yes to the question if state was a variable, and if context was a value. Lastly, I choose for PUT. (I've condensed the steps a bit to keep this brief.)
This worked for me anyway.
Let me know where you're getting stuck!
Ok this is getting me close. I followed your steps and it was identical except for the following:
Went to Spotify> + > Yes for help > Pasted that URL >
The the variable questions
v1? > no
me > no
player > no
repeat > no
state > yes > default value = context
Then on to the rest: Name = 'State=context'
Desc = "Change state to context'
Type > PUT
Test and generate output > Yes
Press check mark
I get the attached screen with a small toast error at the bottom and ion the list of APIs, State is listed as "Not yet tested..."
Ive also attached what happens when I try to run it the AutoWeb API in Tasker. It's the same/similar error as in the toast.
Oh hmm second update: I think it's changing the state, and it might just be the outputs that are throwing an error.
Yes, at my first try, it also gave me an error. Good to see it works for you also ๐
Do you know what's causing the error?
Also, Can you help me walk through how to GET state. The ideal workflow is to pull state and if <> context, change it. I would run this during specific scenarios, where Player=Spotify and Headphones=Connected. The scenario isn't important though, just the GET api
I think the error is caused by the API isn't detecting that a player is active.
I don't know how to detect if the player is Spotify, but I have found out how you can detect which bluetooth device is connected:
I hope this helps you further.
Oh for tasker, I'm all set. Thanks!
Do you know how to set up the autoweb API to pull the repeat or shuffle state?
It's documented at this page: Get Playback State
So, with a GET request to
https://api.spotify.com/v1/me/player?market=US
(You have to change the market to your own at the last step of the setup proces or afterwards. Changing it in the URL directly doesn't work.)
After you've set up the API action for that endpoint, you'll can add an API Output.
Here are my inputs:
You can add another API Output for repeat_state.
As an alternative, you can long press the Spotify Playback State API Action, then select Generate Output. Then tap the checkmark at the top. Deselect any values you don't need, and tap OK.
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โฆ