We have a java application that connects to ExactOnline for performing the operations.
The connection works fine for almost 9days and then it will start complaining about the below exception:
"Request from start.exactonline.nl returned an error (response code: 400, response: { "error":"invalid_grant","error_description":"Token is not allowed, because of invalid or empty chainId"
After encountering this error we have to force re-authorize the application by the user to get the new accessToken.
Now I am getting the below error as well:
"Request to token endpoint https://start.exactonline.nl/api/oauth2/token"
Any help would be appreciated.
The error message it's background and the solutions are explained at https://forums.invantive.com/t/exact-online-error-token-is-not-allowed-because-of-invalid-or-empty-chainid-on-exact-online/2226
Related
Could you explain, why is my app denying requests:
{"message":"Access denied","success":true,"code":500} BODY END E/registerEnd: called E/registerEnd: KtorServiceErrorResponse(success=false, message=Fields [accessToken, refreshToken] are required for type with serial name 'KtorServiceLoginResponse', but they were missing) E/registerEnd: is not a valid ktor response
response 200 but code 500
Any ideas?
I'm trying to run my app in production
I know this question asked many times but currently we have a problem with fetching access token from Google Oauth. Actually, "sign in with Google" works for some accounts on the other hand it doesn't work for some accounts. So we couldn't catch the exact problem.
Actually, there is no problem with fetching code from googleapis...auth?... -> return code.
But fetching access token returns error:
https://oauth2.googleapis.com/token?code=4/0AY0...
&client_id=....apps.googleusercontent.com
&client_secret=...
&redirect_uri=...
&grant_type=authorization_code
Some cases we encounter with:
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
Any suggestion?
Note: I did some research, but none of the suggestions helped (spelling, checking server time, adding access_type=offline to the first OAuth step url, etc.)
Solution:
When I try to fetch token with same code multiple time, google throws invalid_grant error.
1. call https://oauth2.googleapis.com/token?code=my_code -> returns OK.
2. call same request again https://oauth2.googleapis.com/token?code=my_code -> returns invalid_grant.
When you try to fetch token with same code multiple time, google throws invalid_grant error.
1. call https://oauth2.googleapis.com/token?code=my_code -> returns OK.
2. call same request again https://oauth2.googleapis.com/token?code=my_code -> returns invalid_grant.
Here is my code
$client = new Google_Client();
$client->setApplicationName("name");
$client->setClientId('id');
$client->setClientSecret('secret');
$client->addScope("https://www.googleapis.com/auth/userinfo.email");
$token_data = $client->verifyIdToken($token);
verifyIdToken is triggering 500 Internal Server Error if token is invalid. Can you help me to figure out how to get rid of that? And how can i verify the token is valid or not?
Never mind.
I had to use try-catch to catch exceptions. If token is invalid, it will trigger an exception.
I recently switched our site to a different server for ExpressionEngine and all of a sudden I'm getting errors when trying to access a drop down list of Flickr albums.
This is what the error says:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: flickr_sets/ft.flickr_sets.php
Line Number: 35
Here is the code for the php file...line 35-37
foreach($sets['photoset'] as $photoset) {
$photo_sets[$photoset['id']] = $photoset['title'];
}
I haven't changed anything but am wondering if I need to reauthorize the token since I switched to a different server.
Anyone has any idea?
I am getting the following error whenever I try to access credential.refreshToken():
Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant" }
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:>103)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:303)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:340)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:508)
at com.intuit.dmx.storage.google.StorageAuthenticationServiceImpl.authenticateUser(StorageAut>henticationServiceImpl.java:51)
... 2 more
I am not getting this exception everytime. Sometimes it works fine, i.e. I can get the access token, sometimes it throws an exception.