You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Ran Davidovitz <ra...@gmail.com> on 2014/11/30 18:38:18 UTC

Cannot call Google API from my cordova app getting accessNotConfigured

I created a simple cordova (under ionic) app that utilize the Google Client
JS API, to query youtube activities.list.

When simulating the app on my browser everything works BUT when running on
my device or emulator I get error 403 "Access Not Configured. The API is
not enabled for your project, or there is a per-IP or per-Referer
restriction configured on your API key and the request does not match these
restrictions. Please use the Google Developers Console to update your
configuration"

in Google API the you-tube API is enabled and I allowed * as referrer so I
expected every request to be approved. When using chrome://inspect, I can
see that header "x-origin" is "file://" and I think this is the problem
since, if I remove this header and recreate the request it approved.

I am using default setting so all origin are allowed from Cordova and the
error is coming from Google.