-
Notifications
You must be signed in to change notification settings - Fork 14
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
com.darksci.pardot.api.InvalidRequestException #45
Comments
That error indicates that your Pardot API credentials are being rejected by Pardot's API servers. Make sure you've supplied correct credentials. |
It is not correct because after the read we make the creation and the creation works correctly while the read gives that error. Below an example of our code:
|
Running the following to query a prospect which does not exist: final Prospect response = client.prospectRead(new ProspectReadRequest()
.selectByEmail("does-not-exist@example.com")
); for me throws the following:
Which unfortunately is just how the library works at the moment. Likely some work could/should be put in to make error results from the API handled in a better way. Do you see the same error ( |
I have run your code in main class and I have this error: com.darksci.pardot.api.InvalidRequestException: Invalid http response code from server: 400 but In debug mode I have check the correct response inside library: RestResponse{responseStr=' but in library code there is this: throw new InvalidRequestException("Invalid http response code from server: " + restResponse.getHttpCode(), restResponse.getHttpCode()); |
Could the session have timed out ??? After restarting the server, I haven't had this error for a short time. |
Ah that's possible. I'll try to mock up a test and verify the behavior. I thought that the library should automatically re-authenticate and replay the request that failed on session timeout, but there could be a bug there. Will report back. |
Posted a bugfix for the session renewal issue you brought up, thanks for reporting it! I'll release and publish a new version (1.1.2) shortly. |
Published version 1.1.2 with the fix for this. I'm going to close this issue, but if you continue to have problems, or run into other issues please submit an issue and I can help get it resolved. Thanks! |
Hi,
when we call this method with a prospect that not exists in Pardot (email):
pardot.prospectRead(request);
we retrieve this error:
com.darksci.pardot.api.InvalidRequestException: Invalid API key or user key
How we could check if a prospect exists in Pardot without errors?
The text was updated successfully, but these errors were encountered: