0
votes

I am developing an app for iPhone and it basically needs to connect to a Google Calendar API and download some events in the Calendar. (I am the owner of the Calendar)

All the authentication examples that I have seen from 'GTM OAuth 2' require a window for the user to enter his/her user & pass to authenticate the access to his/her Google Calendar. However, my target is a specific Calendar, which I know its username and password. I wonder if there is a way to hardcode the username and password in my Objective-C code and not asking it from the user?

I used to directly write the username and password using the previous GData Calendar API, but it seems that it does not work anymore and I get error 403 for authentication.

I appreciate it if you let me know of your suggestions.

1

1 Answers

0
votes

You can save the OAuth 2 refresh token (or more simply the GTMOAuth2Authorization object's persistenceResponseString) and use that in the client app to authorize the requests. You might want a way to provide updated strings for that to the app.