I have a script to help manage a Google Blogger site and it's been running for little more than a year without any issues.
A couple of weeks ago, the script stopped working properly, instead returning "404 Not Found" errors when requesting a list of comments for a blog post.
ERROR: <HttpError 404 when requesting https://www.googleapis.com/blogger/v3/blogs/<RedactedBlogId>/posts/<RedactedPostId>/comments?status=live&alt=json&maxResults=200 returned "Not Found">
I've also tried the "listByBlog" resource
ERROR: <HttpError 404 when requesting https://www.googleapis.com/blogger/v3/blogs/<RedactedBlogId>/comments?status=live&alt=json&maxResults=200 returned "Not Found">
Comparing with Try this API
What's a little bit weird is that when I use "Try this API"
with same blogId
and postId
, I get the expected response.... IF I also prefix postId
with a forward-slash, i.e. /<RedactedPostId>
Without the forward slash prefix, I get an empty result. I discovered this by accident when copy/pasted the postId
. If I check the network tab in devtools, the requested URL (when receiving a correct response) is https://content.googleapis.com/blogger/v3/blogs/<RedactedBlogId>/posts/%2F<RedactedPostId>/comments?key=<RedactedKey>
The only major difference (apart from the really weird prefix-requirement...) is the domain name.
Python client library
Using the Python Client Library v1.6.5, my script works fine, up to this point. I'm able to request blog info and list of posts just fine. So I have ruled out issues with authentication/authorization.
Conclusions
- I don't believe authorization is the issue since the other resources works
- I have not done any changes in my script ... it just stopped working one day
- upgrading to latest version of python client library did not resolve it
- the fact I have to prefix with
/
when "trying" the API on the documentation site suggests something is fishy with the API resource... - Prefixing
postId
with/
in my python script does not resolve the issue - Just to be clear,
blogId
andpostId
ARE correct, I've double-checked, triple checked, quadruple-checked and copy-pasted exact same values to "Try this API" which, apart from/
-prefix, works as expected.