0
votes

We are working with the Google calendar API. We need to make an REST API call that allows us to create a calendar event from one of our business google accounts. We would like to use the REST API to create this event. The issue is that we want this feature to sit natively in our iOS app. If we use 0Auth 2.0 then the user needs to login to their account and invites can only be sent from the user’s account. We need invites to go from our company account. We also want to read data from our company calendar issuing the REST API. We don’t want to use server side code to do this. We want to do it in swift in the code for our iOS app. Is this possible?

I am looking into these Service accounts for server to server integrations. We can make all the REST APIs client side. Since we are only allowing access to the calendar, it won’t be much of a security risk if the secret key is in our iOS app because worst case scenario, users will get access to our calendar and there really isn’t anything important on our calendar.

1
I have also been doing some reading on the refresh token if we do use 0Auth 2. Would that also be a good option? - Nevin Jethmalani
hiii @Nevin Jethmalani could u help me with google calendar implementation in swift - Dilip Tiwari
Yes what do you need help with? - Nevin Jethmalani
could i connect with skype to u @Nevin Jethmalani - Dilip Tiwari
You can just post your to stack overflow and I can help answer - Nevin Jethmalani

1 Answers

0
votes

For server to server authorization using OAuth, check the Using OAuth 2.0 for Server to Server Applications. It's also called the two-legged OAuth because your application calls Google APIs on behalf of end users instead of individual users.

Steps are:

  1. Create a Service Account
  2. Delegating domain-wide authority to the service account
  3. Preparing to make an authorized API call
  4. Calling Google APIs