Is it possible to read or set the recovery email address in Gmail programmatically? For example via OAuth.
I need to do this for a web app in Ruby on Rails.
Yes, you can do it via web page requests, using a gem e.g. mechanize or system tool e.g. curl.
https://support.google.com/mail/bin/answer.py?hl=en&answer=6566
As far as I know, there's no API way to change it for a normal gmail user.
Google Apps users may have additional capabilities, and so do Google Apps admins, and if you're able to use these then read about admins and provisioning here:
https://developers.google.com/google-apps/email-settings/?hl=en
Retrieving the domain administrator's secondary email address is possible via HTTP:
So is changing the domain administrator's secondary email address; see the same link above.