Closed pierre-charpentier closed 8 years ago
Hi @Qayou,
I'm new with this library and I found nowhere some documentations or example to use it. I'm trying to use the method "createAppointment" but for me the params are chinesee for me. Did you try something with this method ?
Thank you.
Hi @anardil,
I did not try anything with this method I am sorry. But look at the Mail/Request/CreateAppointment class, you can see it is empty. I think this method is not implmented in this API for now.
You should ask @nguyennv or open an issue/suggestion.
Cheers!
Hello @Qayou,
Thanks for your reply. In fact this method is here => zimbra-api/src/Zimbra/Mail/Base.php. line 558
I have already opened an issue for that.
This API is very large and complex, it's a shame to have no documentation :(.
@anardil if you check the method, you will see it uses the Mail/Request/CreateAppointment class. And this class is empty so I would not expect it to work without some work.
@Qayou
For me this class is ok. "CreateAppointment" extends the class "CalItemRequestBase". It's empty because this class doesn't need to have more properties or redefine methods in parent class.
I hope @nguyennv will reply me :)
Hello @Qayou,
nguyennv has given me the solution, you can find it here -> https://github.com/zimbra-api/zimbra-api/issues/11#issuecomment-245861141
Now I'm interested by the preAuth method. In your solution you used the constant "ZIMBRA_PREAUTH_KEY", how did you get this key?
Thank you.
Hi @anardil,
The Zimbra documentation is well done for that. See PreAuth.
To sum it up, on your Zimbra server you can generate a preAuth key using
zmprov generateDomainPreAuthKey YOUR_DOMAIN
or see a key that is already generated using
zmprov gd YOUR_DOMAIN zimbraPreAuthKey
I hope it helps!
Thank you, I'm going to try.
It works like a charm. Thank you.
Issue
Encountered an error when using authPre():
That is what I get:
Possible solution
After some investigation around
authPre()
, I saw that theexpires
parameter is not set at all when using theauthPre()
method. You end up having a concatened string looking like hisjohn.doe@domain.com|name||1135280708088
.Creating my own
PreAuth
object specifying theexpires
parameter, and usingauth()
, solved my issue and allowed me the authenticate successfully.I am still not sure if this is the right way to solve the problem, but it works and I am able to retrieve unread messages like I wanted.
Should the
expires
value be set to 0 by default?