Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ALl,
I am having issues with getting refresh token. I have created oauth2.0 clientid,secrect for dektop application type in biqquery. I have tried to connect it using Talend through bigquery input. The first step was to get authorization code. I have got that by running empty string using client and serect. After that it gaev me URL and i have given allow permissions. it then gave me authorsation code. The problem is next step without refresh token the job wont run. I have tried many ways to get the refresh token and failed to get one. Can someone please help me how to proceed here. I did go through doucmentation and i am using talend 6.5.1
When i tried to get refresh token i am getting this error"
{'error': 'invalid_grant', 'error_description': 'Bad Request'}
Thanks
Vilas
@Vilas Mamidyala , have you read this documentation which shows how to get the access token and refresh token.
After you get the refresh token, add it to the token.properties file which is specified in the Advanced settings tab.
eg:
refreshtoken:your refresh token string
Can you try and let me know if it works?
Regards
Shong
HI I tried the same steps as shown in the URL.
I am unable to complete this step:
POST https://www.googleapis.com/oauth2/v4/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
code=Your Authorization_code_from_step_17&
client_id=your_client_id&
client_secret=your_client_secret&
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
grant_type=authorization_code
by any chance can you show me exactly how this is done in postman
Also there is no "Other" option any more to choose for OAUTH2.0
@Vilas Mamidyala , I did't try with postman, can you take a look at this topic? rhall shows how to get the access toke and refresh token using tRestClient component.
Hi Shong, I tried the same approach as mentioned in the document but i am getting new error now.
---> Unable to connect. This might come from the token expiration. Execute again the job with an empty authorization code.
Exception in component tBigQueryInput_3 (a)
com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
"code" : 404,
"errors" : [ {
"domain" : "global",
"message" : "Not found: Project abc123",
"reason" : "notFound"
} ],
"message" : "Not found: Project abc123,
"status" : "NOT_FOUND"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1049)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
[statistics] disconnected
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at nci_ehr.a_0_1.a$1BigQueryUtil_tBigQueryInput_3.executeQuery(a.java:1100)
at nci_ehr.a_0_1.a.tBigQueryInput_3Process(a.java:1188)
at nci_ehr.a_0_1.a.runJobInTOS(a.java:1766)
at nci_ehr.a_0_1.a.main(a.java:1474)
If you have built the job the I described in the tutorial I put together, it should be returning both a refresh token and an auth token. If you followed the steps and are getting a new error in your job (as suggested above), can you let us know if the job you built to get the refresh and auth token actually returns those tokens? The "new error" you are getting above seems to be related to the tBigQueryInput component. Since my job does not use that component, can I assume the job returns the tokens, but you cannot use them in your job?
We will need a lot more information to help out