hubot-archive / hubot-google-images

A hubot script that interacts with the Google Images API
126 stars 66 forks source link

Bad HTTP response :( 400 #36

Closed EionRobb closed 8 years ago

EionRobb commented 8 years ago

Getting this error when asking for images. Is there a log or a way to debug what's going on? I can see the request being returned as a 400 in the Google Developers Console stats, but can't see the actual request to be able to debug.

HaroldPutman commented 8 years ago

Has it worked before, or is this new? It could be that something is wrong with your environment variables HUBOT_GOOGLE_CSE_ID and/or HUBOT_GOOGLE_CSE_KEY. They should look something like

export HUBOT_GOOGLE_CSE_ID=000000000000000000000:ddddddddddd
export HUBOT_GOOGLE_CSE_KEY=XXXXXXX-yyyyyyyy_zzzzzzzz_AAAAAAAAAAAA

If this is not it, I would manually add some logging into the script (./node_modules/hubot-google-images/src/google-images.coffee), restart hubot and see what's going on.

EionRobb commented 8 years ago

Ah thanks, I had a bad ID (using the project id instead of the custom search engine id)