Google Storage API Forbidden ipRefererBlocked Error -


i'm getting following error when using google storage json api:

$ curl -v 'https://www.googleapis.com/storage/v1/b/my-bucket/o?key=my_api_key' * hostname not found in dns cache *   trying 64.233.186.95... * connected www.googleapis.com (64.233.186.95) port 443 (#0) * tls 1.2 connection using tls_ecdhe_rsa_with_aes_128_cbc_sha * server certificate: *.storage.googleapis.com * server certificate: google internet authority g2 * server certificate: geotrust global ca > /storage/v1/b/my-bucket/o?key=my_api_key http/1.1 > user-agent: curl/7.37.1 > host: www.googleapis.com > accept: */* >  < http/1.1 403 forbidden < vary: x-origin < content-type: application/json; charset=utf-8 < date: tue, 31 mar 2015 16:57:40 gmt < expires: tue, 31 mar 2015 16:57:40 gmt < cache-control: private, max-age=0 < x-content-type-options: nosniff < x-frame-options: sameorigin < x-xss-protection: 1; mode=block * server gse not blacklisted < server: gse < alternate-protocol: 443:quic,p=0.5 < accept-ranges: none < vary: origin,accept-encoding < transfer-encoding: chunked <  {  "error": {   "errors": [    {     "domain": "usagelimits",     "reason": "iprefererblocked",     "message": "there per-ip or per-referer restriction configured on api key , request not match these restrictions. please use google developers console update api key configuration if request ip or referer should allowed.",     "extendedhelp": "https://console.developers.google.com"    }   ],   "code": 403,   "message": "there per-ip or per-referer restriction configured on api key , request not match these restrictions. please use google developers console update api key configuration if request ip or referer should allowed."  } } 

but seems configured correctly. key i'm using listed allowing ip:

api key configuration

the apis active:

apis enabled

and project has billing information correctly configured:

correctly configured billing

i've tried enabling , disabling apis , refreshing billing info. nothing helping. next steps? try aws?

for posterity here happened:

i spun different vm in same datacenter (linode in newark/nj) , worked perfectly, problem seemed not key, ip itself.

in order bottom of had pay google cloud us$ 150.00 let me open support ticket , describe issue.

i spend next 2 days arguing support staffer – while being polite – assumed error in end instead of theirs.

after writing 6000 character reply super specific details decided check , found out ip had been blocked google traffic automation system because erroneously detected ip came restricted country (iran).

given vm in new jersey – , easy see through traceroute – told me have manually overwrite system , place ip in us. take 3 days, waited.

three days later got email telling me test everything, , did. didn't work. after couple of emails , waiting day fixed it.

the cherry on top of whole mess having google support staffer accuse company of doing business restricted countries , acting proxy traffic coming iran. preposterous , offended us, because after making mistake still wanted blame doing nothing wrong.

we told 2 engineers turn vm backwards , see if find evidence of had been hacked , of course couldn't. patched ubuntu 14.04 server 1 ssh through ones private key , remote root login disabled.

and how tale ends, folks. spending us$ 150.00 notify google of own mistake , having fight way solution.

oh, , 1 more thing: we're migrating aws.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -