undefined local variable or method `key' for Google::Auth::DefaultCredentials:Class -
when do:
scopes = ['https://www.googleapis.com/auth/contacts.readonly'] contacts = google::apis::mirrorv1::mirrorservice.new = google::auth.get_application_default(scopes) i in 3rd line:
unable read credential file specified google_application_credentials: undefined local variable or method `key' google::auth::defaultcredentials:class
i'm downloading json file developers console, has following structure:
{ "web": { "client_id": "...", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_email": "", "client_x509_cert_url": "", "client_secret": "...", "redirect_uris": [ "http://localhost:3000/...", "http://localhost:3000/..." ], "javascript_origins": [ "http://localhost:3000" ] } } and set google_application_credentials environment variable pointing .json file.
i'm not sure why error.
thanks in advanced
Comments
Post a Comment