Solved Authorization for request
-
Here is the command and respons :
pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ npm run list
MMM-GoogleAssistant@4.0.4 list /home/pi/MagicMirror/modules/MMM-GoogleAssistant
node installer/list.js~MMM-GoogleAssistant v4~ Device List
[GA] Opening OAuth URL. Return here with your code.
[GA] If your browser will not open, you can copy/paste this URL:
https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fassistant-sdk-prototype&response_type=code&client_id=663651247229-l3pjgilbj70evbsm94nc1ucop95o7ple.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fgoogleassistant.bugsounet.fr[GA] Paste your code: 4/0AX4XfWjGuwHJzbMECx2Ww4B6iL4dASFeybRWhtw3s4EYRwCCv6omLrm2CPp7pA9NSbgLxw
[GA] Error getting tokens: GaxiosError: invalid_grant
at Gaxios._request (/home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/gaxios/build/src/gaxios.js:129:23)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async OAuth2Client.getTokenAsync (/home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/google-auth-library/build/src/auth/oauth2client.js:124:21) {
response: {
config: {
method: ‘POST’,
url: ‘https://oauth2.googleapis.com/token’,
data: ‘code=4%2F0AX4XfWjGuwHJzbMECx2Ww4B6iL4dASFeybRWhtw3s4EYRwCCv6omLrm2CPp7pA9NSbgLxw&client_id=663651247229-l3pjgilbj70evbsm94nc1ucop95o7ple.apps.googleusercontent.com&client_secret=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&redirect_uri=https%3A%2F%2Fgoogleassistant.bugsounet.fr&grant_type=authorization_code&code_verifier=’,
headers: [Object],
paramsSerializer: [Function: paramsSerializer],
body: ‘code=4%2F0AX4XfWjGuwHJzbMECx2Ww4B6iL4dASFeybRWhtw3s4EYRwCCv6omLrm2CPp7pA9NSbgLxw&client_id=663651247229-l3pjgilbj70evbsm94nc1ucop95o7ple.apps.googleusercontent.com&client_secret=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&redirect_uri=https%3A%2F%2Fgoogleassistant.bugsounet.fr&grant_type=authorization_code&code_verifier=’,
validateStatus: [Function: validateStatus],
responseType: ‘json’
},
data: { error: ‘invalid_grant’, error_description: ‘Bad Request’ },
headers: {
‘alt-svc’: ‘h3=“:443”; ma=2592000,h3-29=“:443”; ma=2592000,h3-Q050=“:443”; ma=2592000,h3-Q046=“:443”; ma=2592000,h3-Q043=“:443”; ma=2592000,quic=“:443”; ma=2592000; v=“46,43”’,
‘cache-control’: ‘no-cache, no-store, max-age=0, must-revalidate’,
connection: ‘close’,
‘content-encoding’: ‘gzip’,
‘content-type’: ‘application/json; charset=utf-8’,
date: ‘Thu, 14 Apr 2022 20:24:09 GMT’,
expires: ‘Mon, 01 Jan 1990 00:00:00 GMT’,
pragma: ‘no-cache’,
server: ‘scaffolding on HTTPServer2’,
‘transfer-encoding’: ‘chunked’,
vary: ‘Origin, X-Origin, Referer’,
‘x-content-type-options’: ‘nosniff’,
‘x-frame-options’: ‘SAMEORIGIN’,
‘x-xss-protection’: ‘0’
},
status: 400,
statusText: ‘Bad Request’,
request: { responseURL: ‘https://oauth2.googleapis.com/token’ }
},
config: {
method: ‘POST’,
url: ‘https://oauth2.googleapis.com/token’,
data: ‘code=4%2F0AX4XfWjGuwHJzbMECx2Ww4B6iL4dASFeybRWhtw3s4EYRwCCv6omLrm2CPp7pA9NSbgLxw&client_id=663651247229-l3pjgilbj70evbsm94nc1ucop95o7ple.apps.googleusercontent.com&client_secret=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&redirect_uri=https%3A%2F%2Fgoogleassistant.bugsounet.fr&grant_type=authorization_code&code_verifier=’,
headers: {
‘Content-Type’: ‘application/x-www-form-urlencoded’,
‘User-Agent’: ‘google-api-nodejs-client/7.14.1’,
‘x-goog-api-client’: ‘gl-node/14.19.1 auth/7.14.1’,
Accept: ‘application/json’
},
paramsSerializer: [Function: paramsSerializer],
body: ‘code=4%2F0AX4XfWjGuwHJzbMECx2Ww4B6iL4dASFeybRWhtw3s4EYRwCCv6omLrm2CPp7pA9NSbgLxw&client_id=663651247229-l3pjgilbj70evbsm94nc1ucop95o7ple.apps.googleusercontent.com&client_secret=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&redirect_uri=https%3A%2F%2Fgoogleassistant.bugsounet.fr&grant_type=authorization_code&code_verifier=’,
validateStatus: [Function: validateStatus],
responseType: ‘json’
},
code: ‘400’
}
pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ -
thanks to use this for pasting content:
that is see,
invalid_grant
do this.
I means you don’t have register correctly or you don’t authorize correctly some needed part on google OAuth screen -
Well, I do it again and now it’s OK . I do not know what was wrong but with generating once again ‘‘npm run list’’ then past the new generated code and now i got this oufff !!!
[GA] Device instance data: {
devices: [
{
id: ‘MMM-GoogleAssistant’,
nickname: ‘Jarvis’,
name: ‘projects/mmbring/devices/MMM-GoogleAssistant’,
modelId: ‘mmbring-bugsounet_GA’,
clientType: ‘SDK_SERVICE’
}
]
}Thank you again
-
So it’s registred on google home app
do you assign Jarvis to your house on Google Home app ?
-
nop ! I don’t have any Google Home device except my Magic Mirror. Where shall I assign Jarvis on my Google Home App? Further more, I tried to call Jarvis and ask her to add a bottle of milk to my Bring list. She answerd : First of all, you have to authorise me to access to your personnal information. You can do this from your GA from your téléphone
-
launch Google home app on your phone
you will discover Jarvis -
ok and then from it, I can activated and use my MM² instead of to pilot my bring list using Jarvis ? Still from my MM², not from my phone?
-
If you don"t assign Jarvis on your google home app, you can’t activate personal search … so you can’t use EXT-Brings and vocal control
(It’s not my rules… it’s Google Rules !) -
ok so, it has to be done 1st from any Google Home device ? ( Mobile, Pad or Spearkers) and then I can use only my Migic Mirror and Jarvis from it?
-
We will finish… before
retry again a question wil personal search
I will (again) ask to you authorization:- On the top the autorization screen on your phone, just type the name of the application
Jarvis
(Attention Jarvis with aJ
not aj
) - engage personal search and validate
retry again … it will works now
- On the top the autorization screen on your phone, just type the name of the application
-
@Phil_Magic2 said in Authorization for request:
ok so, it has to be done 1st from any Google Home device ? ( Mobile, Pad or Spearkers) and then I can use only my Migic Mirror and Jarvis from it?
I’m coding some part for controling
Jarvis
from google Home app- Turn on/off screen
- Volume
- and some other cool control !
It will be available soon
-
@bugsounet Am configuring GHA on my phone. When I got Jarvis with capital J I will tell you
-
@bugsounet great 🤩🤩🤩🤩🤩
-
@bugsounet said in Authorization for request:
wiki says This
I you don’t register Jarvis app into Google Home app, you have your actual issue
Exactly that I wrote there …
-
@mecco86 it’s ok for you too ?
-
Am lost. I need one more account with mail as ID and Password for Jarvis account ?
-
normaly not just maybe for bring!
-
Actually am lost, because on Google Home App (dwonloaded from the Play Store), I got :
‘‘Fonctionne avec Google’’ Controle de la Maison’’ From here I can select among many icon. And one of them is Jarvis. If I select Jarvis, I have to create an account to use it.
And it is written in Italian. Actually My account is not recognized
-
@bugsounet solved. I try to reinstall GA modules, first i remove all authorization for my account and i re-autorized
-
@mecco86 : perfect !
@Phil_Magic2: maybe you have some multi google account on your phone. Identify Jarvis with you GA gmail account used when you create it