veda-consulting-company / uk.co.vedaconsulting.googlegroup

Other
6 stars 8 forks source link

Google Error | Error: invalid_request Missing required parameter: client_id #9

Closed joseltorres closed 4 years ago

joseltorres commented 8 years ago

I'm having an issue getting civi to connect with google. I get groups setup and API credentials, then try to setup the sync. After I enter credentials I get an error. screen shot 2016-05-26 at 2 58 01 pm

400 That’s an error. Error: invalid_request Missing required parameter: client_id

Request Details access_type=offline approval_prompt=auto scope=https://www.googleapis.com/auth/admin.directory.group response_type=code redirect_uri=http://jtorres.pesc.com/d7/civicrm/googlegroup/settings?reset=1 client_id=

screen shot 2016-05-26 at 2 53 21 pm

in the civi/drupal logs I see a debug message: $$auth_url = https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=http%3A%2F%2Fjtorres.pesc.com%2Fd7%2Fcivicrm%2Fgooglegroup%2Fsettings%3Freset%3D1&client_id=&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadmin.directory.group&access_type=offline&approval_prompt=auto

Kajakaran commented 8 years ago

@joseltorres

It looks like you haven't filled your client_id and client_secret in the following php file

https://github.com/veda-consulting/uk.co.vedaconsulting.googlegroup/blob/master/googlegroup.php

Line numbers 6 & 7

Thanks Kajan

adeguk commented 7 years ago

@joseltorres so what happened, have you been able to resolve this. i am getting this same error using Socialite in Laravel 5.4, Client ID and Client secret even the callback had been set as describe by Google and socialite

adeguk commented 7 years ago

@joseltorres I just resolve mine issue similar to yours, I suggest you check the labels probably - maybe instead of client_id you had use client_key which will create some kind of mismatch or unseen by the API. Thanks @Kajakaran as I had to check every letter to see my silly mistake, lol

Ishaqzamueani commented 6 years ago

43676b

aguywithnojob commented 6 years ago

Same error please help me out in laravel v5.6 and i want to use valet in laravel any tutorial?

andrimont commented 6 years ago

Hello

I use the latest 2015 extension to sync Civi Groups with Google Groups on CiviCRM 5.4.0. But no luck I have the same feedback as @joseltorres.

It is not clear if we should fill the client_id and client_secret in the php file as adviced by @Kajakaran I tried both anyway but no luck

The OAuth client was not found. Request Details response_type=code redirect_uri=https://MYSERVER.com/civicrm/googlegroup/settings?reset=1 client_id= MY-CLIENT-ID.apps.googleusercontent.com scope=https://www.googleapis.com/auth/admin.directory.group access_type=offline approval_prompt=auto


What is wrong with my setting ?
Thanks for any help.

**The issue is identified** : while pasting the client_id from Google, there is "space" that is included : either at the beginning either at the tail… So in the php file there was this "space" included giving a Error: invalid_client from Google !

So I could after removing the  "space"  the connection with Google is established. 

Now I cannot yet see that Google connection in the Civi groups setting but that might be a 24h waiting time on Google side.

Let's way…
Sivaneymar07 commented 5 years ago

400: Google Error | Error: invalid_request Missing required parameter: request_uri

I resolve by adding callbackURL in the new GoogleStrategy({callbackURL : 'xx', clientID: 'yy', clientSecret: 'zz}, () => {}). problem solved, it redirected to google account signin page, check typo.

joseltorres commented 4 years ago

I gave this another try and it's working for me. The only thing though, is adding the client key and secret in the googlegroup.php file and in the setting page. Just entering in setting page didn't work for me

define('GOOGLE_CLIENT_KEY', '');
define('GOOGLE_SECERT_KEY', '');

*Drupal 7 and CiviCRM 5.19

programmer333 commented 4 years ago

**_

_**

programmer333 commented 4 years ago

sdfsdfsdf