Curl returns forbidden
Posted 12 Jul 2017, 9:47:22
Hi,
I'm trying to request the setlist for a specific event with php using CURL. However, it returns “message”: “Forbidden”
When I use the Swagger UI the same thing happens..
{
“content-type”: “application/json”,
“content-length”: “24″,
“date”: “Wed, 12 Jul 2017 09:34:36 GMT“,
“x-amzn-requestid”: “51cb214c-66e5-11e7-9e03-39221870aa8b”,
“x-amzn-errortype”: “ForbiddenException”,
“via”: “1.1 7c685272394b8e1c5674f9160261a2bd.cloudfront.net (CloudFront), 1.1 b47ef3766a859c0c1ae31872e114e497.cloudfront.net (CloudFront)”,
“x-cache”: “Error from cloudfront”,
“x-amz-cf-id”: “y9OkeeUDXf2FTnqYtifBQfCicknDl0vg7WLbplWijCNJs3RslVhrmQ==”,
“x-firefox-spdy”: “h2″
}
Perhaps somethings wrong with the API at the moment?
Posted 12 Jul 2017, 9:52:11
Sorry! setlist.fm recently (yesterday) switched to a new API version and the previously created api keys aren't activated for the new version yet (they are for the old version though). They should be activated very soon, watch this space.
cheers
Posted 12 Jul 2017, 10:30:08
Ah, excellent timing on my part! :-)
Thanks!
Posted 13 Jul 2017, 7:31:27
Ah, excellent timing on my part! :-)
Haha, yes. Sorry. Should work now!
Posted 15 Jul 2017, 8:56:08
really hope this gets figured out soon, im soo frustrated , starting migration over to songkick just in case..
Posted 16 Jul 2017, 16:50:10
Have you tried to access the API through HTTPS? As far as I know, the new API only accepts requests over HTTPS.
Posted 17 Jul 2017, 6:50:10
Strange. It's been working fine for me these last few day.
Posted 19 Jul 2017, 6:46:16
im having the same issue as well
Just checked and your API key is definitely active (and has been since July 11) . Have you tried using the interactive interface with your API key?
Posted 19 Jul 2017, 18:11:15
i have not checked in a couple days, i did try the interactive interface and was getting the same results, thankyou for looking into this, i will try again now
Posted 20 Jul 2017, 6:06:50
i did try the interactive interface and was getting the same results
maybe a heads up: I've seen the interactive interface return 4xx codes using Safari, you might want to use a different browser e.g. Chrome
Posted 20 Jul 2017, 13:30:07
still getting the same, i am currently using chrome
Posted 20 Jul 2017, 13:37:44
still getting the same, i am currently using chrome
And you're definitely using the key from your settings in the interactive interface?
It's because I checked again and tried it out myself seconds ago, the API key is active and the API returns 200s. Could you please provide more details? What response do you get?
Last edited 20 Jul 2017, 13:37:59
Posted 24 Aug 2017, 10:53:22
There is an example with spring resttemplate for Android in java? I added x-api-key and content type application/json in header , but as result have Forbidden
Sorry for my english
I have:
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestBody = new HashMap<String, Object>();
requestBody.put(“artistName”, “Springsteen”);
requestBody.put(“date”, “” + dataConcerto);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set(“x-api-key”, “key”);
HttpEntity<String> request = new HttpEntity<String>(requestBody.toString(), headers);
String response = restTemplate.exchange(“https://api.setlist.fm/rest/1.0/search/setlists”, HttpMethod.GET, request, String.class).getBody();
Last edited 24 Aug 2017, 16:42:23