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...
I'm using spotify podcast to be hosted by a website. I need to get the podcast duration from embed link. Something like this "https://open.spotify.com/embed/episode/26CbyH3PccV573LrPKmmcb"
What API exactely should call? note that I'm using node.js
Thanks in advacne.
Solved! Go to Solution.
Hey @Ximazend,
I'm happy to share with you that I managed to run the script successfully. For a further documentation of "how to", then this is my snippet code.
https://codepen.io/Ahmed_B_Hameed/pen/YzdmgPK?editors=1112
Thank you once more.
Ahmed.
If you have the Client Credentials flow set up, you can use the Get Episode endpoint to get the duration in milliseconds using the episode id.
Thank you for your kind respond.
It seems that the Spotify using ID different from the embed:embed:ID . I tried the following:
If I use this link
"https://open.spotify.com/embed/episode/26CbyH3PccV573LrPKmmcb"
and it runs in the browser but as soon I use the ID like this:
Because you are using Client Credentials, you'll need to specify the market.
Hmm, did not know about that!
May you support me please providing me with some links to read more about what to do in specific ?
Thank you so much for your kind support.
Okay I see the missing parameter of market. I will check how to grab this variable. Thank you for your kind support.
I wrote a code to embed "market=XX" for all markets coming from the API https://api.spotify.com/v1/markets
All failed unfortunately? Any alternative idea?
XX must be replaced with one country code such as US. Spotify isn't available in XX.
Maybe I understood your last message.
What have you already made?
Hey @Ximazend,
Here are the things I did in steps:
- Fetch a token from client ID and secret ID.
- Fetch markets from https://api.spotify.com/v1/markets
That returns me the following response:
{ "markets": [ "AD", "AE", "AG", "AL", "AM", "AO", "AR", "AT", "AU", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BN", "BO", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CG", "CH", "CI", "CL", "CM", "CO", "CR", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ES", "ET", "FI", "FJ", "FM", "FR", "GA", "GB", "GD", "GE", "GH", "GM", "GN", "GQ", "GR", "GT", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IQ", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MN", "MO", "MR", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NE", "NG", "NI", "NL", "NO", "NP", "NR", "NZ", "OM", "PA", "PE", "PG", "PH", "PK", "PL", "PS", "PT", "PW", "PY", "QA", "RO", "RS", "RW", "SA", "SB", "SC", "SE", "SG", "SI", "SK", "SL", "SM", "SN", "SR", "ST", "SV", "SZ", "TD", "TG", "TH", "TJ", "TL", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VC", "VE", "VN", "VU", "WS", "XK", "ZA", "ZM", "ZW" ] }
- I wrote a script to loop through those values and attach them like this GET https://api.spotify.com/v1/episodes/{id}?market=${market} including auth Bearer <TOKEN>
And they failed all of them 😞
If you need to see some code, let me know so I can post some links for the it.
Thank you so much and looking forward for your support.
Yes, some code will be helpful. Just specifying one market should be sufficient normally.
Hey @Ximazend,
I'm happy to share with you that I managed to run the script successfully. For a further documentation of "how to", then this is my snippet code.
https://codepen.io/Ahmed_B_Hameed/pen/YzdmgPK?editors=1112
Thank you once more.
Ahmed.
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…