Page 1 of 1

REST API Get Calendars

Posted: Tue Aug 25, 2020 7:56 am
by zimbrat0r
Hi !

I'm using the REST API to query the calendar items of users.
The only way i'm able to do that for now is to connect by using the users credentials.

I would like to know (not found in the doc :( ) if there is a way to connect by using "impersonation" using REST API.

Thanks at all for your help (i'm using Python).

Re: REST API Get Calendars

Posted: Thu Sep 03, 2020 7:34 am
by barrydegraaff
There are a number of ways to do this.

One easy way is to set up preAuth on your domain, that way you can get an authtoken for any user you need to get the calendar of, and then use the REST API as you already now. If you implement your own pre-auth mechanism be careful not to expose/open it to the public as this may have security implications. get an auth token, then you can use REST!

Another way is using an admin account to get the calendar using SOAP. One way to find out how to do this is take a look at what the zmmailbox command does when you invoke it via the CLI on the server

Code: Select all

 zmmailbox -d -z -m -t 0 getRestURL "/calendar"

This will dump all SOAP requests to the terminal, so you can implement whatever you need from that in your application.

Re: REST API Get Calendars

Posted: Thu Sep 03, 2020 7:52 am
by zimbrat0r
Thanks for your reply i managed to do it by using auht, thanks again !