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

How to add startHistoryId queryParameter to google-mail:history/list (camel-quarkus-google-mail) #1927

Closed
krecco opened this issue Oct 16, 2020 · 3 comments

Comments

@krecco
Copy link

krecco commented Oct 16, 2020

Hi,

I am new to camel and I have a problem using camel-quarkus-google-mail library. Could someone help me with startHistoryId queryparameter in google-mail:history/list.

.to("google-mail:history/list?userId=me&....&startHistoryId=12322121")

producess error:

org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: google-mail://history/list?accessToken=xxxxxx&clientId=1046205375681-ft857s5vbne72jgroojuglodtga079n5.apps.googleusercontent.com&clientSecret=xxxxxx&startHistoryId=6944817&userId=me due to:

There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{startHistoryId=6944817}]

i've searched through documentation/web but I can't find a solution.
Thanks.

@ppalaga
Copy link
Contributor

ppalaga commented Oct 16, 2020

There is no single mention of startHistoryId in https://camel.apache.org/components/latest/google-mail-component.html so is not expected to work the way you have it. However, this SO answer suggests that you can pass it via Camel message header, something like:

.setHeader("startHistoryId", constant("12322121"))
.to("google-mail:history/list?userId=me&....")

@krecco
Copy link
Author

krecco commented Oct 16, 2020

@ppalaga thanks for your answer.

I have tried what you suggested (seting headers) before opening issue, but with no success.
Reply from google:

{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Missing/invalid parameter: startHistoryId",
"reason" : "invalidArgument"
} ],
"message" : "Missing/invalid parameter: startHistoryId",
"status" : "INVALID_ARGUMENT"
}

@ppalaga
Copy link
Contributor

ppalaga commented Oct 16, 2020

It looks like it is not supported by Camel. Could you please request it as a new feature on https://issues.apache.org/jira/browse/CAMEL and paste the issue link here?

@krecco krecco closed this as completed Oct 18, 2020
@ppalaga ppalaga added this to the No fix/wont't fix milestone Oct 19, 2020
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

2 participants