I used to be able to query the Google Analytics API with my account\'s login & password. Google is now using OAuth for authentication which is great... The only issue is
You can use a refresh token. Store the refresh token in a db or secure config file, then use it to show the stats.
Google API Offline Access Using OAuth 2.0 Refresh Token will give you an idea of how to capture then store your refresh token.
See also Using OAuth 2.0 for Web Server Applications - Offline Access