Yes you probably want to use OAuth – I have a post specifically about working with google analytics, since I did quite a bit with it for http://bitestats.com. You can find my post, with code examples, here: http://lornajane.net/posts/2010/google-analytics-accounts-api