Search code examples
google-apigoogle-books

Google Books API Cover images over HTTPS fails due to certificate error


Starting yesterday requests to cover images via https began failing with

ERR_INSECURE_RESPONSE.

For example:

https://www.googleapis.com/books/v1/volumes/zaRoX10_UsMC

When trying to access the https version of the thumbnail:

https://bks1.books.google.com/books/content?id=zaRoX10_UsMC&printsec=frontcover&img=1&zoom=1&edge=curl&imgtk=AFLRE72edPPkxV6QHjzfmvf2sug_dIzxNCI02YJVAnqRe6xPdaL1GDx5m-h_2nqbzj2ZJ_krgtSW245c0-gwIF85xUi5rJ2-v07QuQl9ker6apIdeJi27W9RVadaCBwaCqxsQPy-1rt9&source=gbs_api

In Chrome this returns a response of NET::ERR_CERT_COMMON_NAME_INVALID Safari and Firefox also are unable to load the resource due to a certificate error.

enter image description here


Solution

  • Remove the sub-sub-domain, or the encryption:

    Their certificate covers wildcard.google.com but not wildcard.wildcard.google.com. Just speculating I'd guess that bks1 is one of a pool of servers behind books.