How to use API key to view setlist objects in browser?

How to use API key to view setlist objects in browser?

Posted 28 Jun 2019, 21:29:51

I have received an API key from setlistFM and I will be using this for an application I am making that can retrieve setlists from various bands/sets. Before I start making my app I would like to view the data model in my browser but I am unable to figure out how to do that.

What is the root url or format I need to enter in my browser in order to view the setlist JSON objects?

Thanks in advance!

Re: How to use API key to view setlist objects in browser?

Posted 1 Jul 2019, 6:43:24

The easiest way to view the API in a browser is to use the interactive interface. Enter your API in the to-right box and click explore (leave the URL field as is). Then scroll down and use the endpoints.

Re: How to use API key to view setlist objects in browser?

Posted 9 Sep 2019, 16:02:19

I tried this and I am still getting the {message: forbidden}

Re: How to use API key to view setlist objects in browser?

Posted 10 Sep 2019, 7:30:48

I tried this and I am still getting the {message: forbidden}

Please tell us the steps you performed in order to be able to reproduce.

Re: How to use API key to view setlist objects in browser?

Posted 15 Oct 2019, 13:38:53

Please forgive me as I don't use API's on the regular. I am trying to use the interactive interface with searching for setlist info. I have logged in, and put in the band's MBID. I am also getting the {message: forbidden}. What am I missing?

Re: How to use API key to view setlist objects in browser?

Posted 15 Oct 2019, 13:41:41

What am I missing?

Did you paste your api key into the field in the top right corner on the interactive interface page?

Re: How to use API key to view setlist objects in browser?

Posted 15 Oct 2019, 13:53:44

I have my api key in. I get response code 200 in the form, but the url is still giving me forbidden when I copy and paste over. Clearly, I am missing something.

Re: How to use API key to view setlist objects in browser?

Posted 15 Oct 2019, 15:34:51

Maybe it would be helpful to explain what I am trying to source. I am looking to do a GIS based project with geocoding all the songs a band has played throughout their career so far. I was hoping to use this data as a start point for my project. It is a popular band with a ton of performances. I am attempting to use the {MBID}/Setlists tool to get the raw data.

Any suggestions as to what I am missing?

Re: How to use API key to view setlist objects in browser?

Posted 16 Oct 2019, 6:58:58

I get response code 200 in the form, but the url is still giving me forbidden when I copy and paste over.

The header 'x-api-key' needs to be set, this could be the problem when just copying over the URL. Set your actual api key as value of the header and you should be fine.

Re: How to use API key to view setlist objects in browser?

Posted 16 Oct 2019, 16:51:22

I enter my API Key in the header. I am trying to get all the setlists for an artist, so I use the MBID/Setlist tool. I enter the MBID for the artist, leave the P value at 1, which the return code shows the 20 most recent setlists. Id like for it to be much more than the 20 setlists since this artist has had over 2000 shows. But that's not my biggest problem yet.

So I take the return URL, copy it into a new tab, and I get the forbidden error. I am sorry if there is something small Im missing, and I am not much of a coder.

End result, I am looking to get all the setlists and other info into a spreadsheet to pull into another system. I just don't seem to be doing this right to pull info from the system.

Re: How to use API key to view setlist objects in browser?

Posted 17 Oct 2019, 6:42:26

So I take the return URL, copy it into a new tab, and I get the forbidden error.

That's the thing you're missing. You have to provide the `x-api-key` header for each request. If you're trying to see the result in a browser, you have to provide the header as well (there are browser add-ons that allow you to do this).

Post Reply

You're not allowed to do this, please sign in first.