Please help, here is the codes:
OAuth2Client.setCredentials(tokens)
const oauth2 = google.oauth2({ version: "v2", auth: OAuth2Client })
const userinfo = await oauth2.userinfo.v2.me.get({})
console.log(userinfo)
userinfo is undefined
in console log and either some other libraries are.
I'm using [email protected]
and [email protected]
this has accidentally happened, it was running well yesterday...
Is it a bug or am I doing something wrong?
@hainguyents13
I have the same issue ( What is wrong ?
This usually happens when you're using a super old version of the library :) Can you check that you're on version 40?
@JustinBeckwith
Yes you are right, I had old version. Updated to v.40 and everything ok.
Thanks.
Most helpful comment
@JustinBeckwith
Yes you are right, I had old version. Updated to v.40 and everything ok.
Thanks.