Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem after command node index.js #16

Open
san4opan4o opened this issue Apr 1, 2022 · 2 comments
Open

Problem after command node index.js #16

san4opan4o opened this issue Apr 1, 2022 · 2 comments

Comments

@san4opan4o
Copy link

It seems to be correct, but the query gives out a huge errors

GaxiosError: invalid_grant: Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim. at Gaxios._request (C:\Users\trust\Desktop\google-indexing-api-bulk-master\node_modules\gaxios\build\src\gaxios.js:129:23) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async GoogleToken.requestToken (C:\Users\trust\Desktop\google-indexing-api-bulk-master\node_modules\gtoken\build\src\index.js:231:23) at async GoogleToken.getTokenAsync (C:\Users\trust\Desktop\google-indexing-api-bulk-master\node_modules\gtoken\build\src\index.js:142:20) at async JWT.refreshTokenNoCache (C:\Users\trust\Desktop\google-indexing-api-bulk-master\node_modules\google-auth-library\build\src\auth\jwtclient.js:171:23) at async JWT.authorizeAsync (C:\Users\trust\Desktop\google-indexing-api-bulk-master\node_modules\google-auth-library\build\src\auth\jwtclient.js:152:24) { response: { config: { method: 'POST', url: 'https://www.googleapis.com/oauth2/v4/token', data: [Object], headers: [Object], responseType: 'json', paramsSerializer: [Function: paramsSerializer], body: 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ0YWtldG9uZXMtNDc0QHRha2V0b25lcy5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9pbmRleGluZyIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImV4cCI6MTY0ODgyMDc4MywiaWF0IjoxNjQ4ODE3MTgzLCJzdWIiOm51bGx9.MV7GFkye0QZnJb5GC8uWX_BrCpxQxIajH5vsLLseGsFwNJhL0LTtuGPykAASiVHFyLDRUUCsC-B7pdl_AvsQkXyokTP-OPYUCwW7FNaib-1wQvywBqXeQhV2WvJnj-YTvOlv7_TSzmpkd_6X1jd_L-CRQcGBaQmQNFjNiWfvcQ7dxNP0T_Xeq0Bfhy5goD121ndjn2yrrc_sCJRSu685GAXHE2ovIjDv42RRm657pCCD9RkseC2xAV0O6-4JGrqNPNt5hD7ACYaDWkULUeXYqP40wrNTg4ak1-gd--WoDbM24H88zWRcwxOXAzdL7yCIF8-eIN9goAlO_Cu4vhgj7w', validateStatus: [Function: validateStatus] }, data: { error: 'invalid_grant', error_description: 'Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim.' }, 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': 'private', connection: 'close', 'content-encoding': 'gzip', 'content-type': 'application/json; charset=UTF-8', date: 'Fri, 01 Apr 2022 11:46:23 GMT', 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://www.googleapis.com/oauth2/v4/token' } }, config: { method: 'POST', url: 'https://www.googleapis.com/oauth2/v4/token', data: { grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', assertion: 'eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ0YWtldG9uZXMtNDc0QHRha2V0b25lcy5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9pbmRleGluZyIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImV4cCI6MTY0ODgyMDc4MywiaWF0IjoxNjQ4ODE3MTgzLCJzdWIiOm51bGx9.MV7GFkye0QZnJb5GC8uWX_BrCpxQxIajH5vsLLseGsFwNJhL0LTtuGPykAASiVHFyLDRUUCsC-B7pdl_AvsQkXyokTP-OPYUCwW7FNaib-1wQvywBqXeQhV2WvJnj-YTvOlv7_TSzmpkd_6X1jd_L-CRQcGBaQmQNFjNiWfvcQ7dxNP0T_Xeq0Bfhy5goD121ndjn2yrrc_sCJRSu685GAXHE2ovIjDv42RRm657pCCD9RkseC2xAV0O6-4JGrqNPNt5hD7ACYaDWkULUeXYqP40wrNTg4ak1-gd--WoDbM24H88zWRcwxOXAzdL7yCIF8-eIN9goAlO_Cu4vhgj7w' }, headers: { 'Content-Type': 'application/x-www-form-urlencoded', Accept: 'application/json' }, responseType: 'json', paramsSerializer: [Function: paramsSerializer], body: 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ0YWtldG9uZXMtNDc0QHRha2V0b25lcy5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9pbmRleGluZyIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImV4cCI6MTY0ODgyMDc4MywiaWF0IjoxNjQ4ODE3MTgzLCJzdWIiOm51bGx9.MV7GFkye0QZnJb5GC8uWX_BrCpxQxIajH5vsLLseGsFwNJhL0LTtuGPykAASiVHFyLDRUUCsC-B7pdl_AvsQkXyokTP-OPYUCwW7FNaib-1wQvywBqXeQhV2WvJnj-YTvOlv7_TSzmpkd_6X1jd_L-CRQcGBaQmQNFjNiWfvcQ7dxNP0T_Xeq0Bfhy5goD121ndjn2yrrc_sCJRSu685GAXHE2ovIjDv42RRm657pCCD9RkseC2xAV0O6-4JGrqNPNt5hD7ACYaDWkULUeXYqP40wrNTg4ak1-gd--WoDbM24H88zWRcwxOXAzdL7yCIF8-eIN9goAlO_Cu4vhgj7w', validateStatus: [Function: validateStatus] }, code: '400' }

@SofianeBoumedine
Copy link

Hi same as you

@EvgenijChekh
Copy link

Just remove comment from text. You need to delete all text from this file and copy-paste your JSON key from downloaded file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants