As part of an app I am working on, I would like to provide a list of holidays. I am attempting to use the Google API to do this. Before writing the code, I just want to have a look at what the JSON that is returned looks like.
I set up an account in Google, got an API key, and got set up to use the Google Calendar API. I did research on the HTML needed to get a list of holidays, but cannot seem to get it to work. I went through all of the Calendar API documentation and did not find anything about retrieving a list of holidays. Here are some of the URLs that I tried, and the responses that I received. I found all of these URL examples online (mostly here). I've removed my API key.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
https://www.googleapis.com/calendar/v3/calendars/en.uk@holiday.calendar.google.com/events?key=myKey
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
Google is seeing my requests, and they are all errors.
It seems like the URLs that I've found online might have worked at one time, but no longer seem to work.
Is there any update on how to use this?
Update: I tried the information on the answer below and now I get this:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
I tried en.danish#holiday@group.v.calendar.google.com
in the Try This API section of the Events:List API reference and I was able to get the JSON for the dates. I do not understand why it works in Try This API, but it is not working from url. The latest url that I tried: