如何使用PHP以编程方式验证谷歌api?

I've just tried "Hello Analytics API" and before getting the data, user is redirected to authentication page.

Is it possible to authenticate programmatically ?

thanks in advance

No it isn't possible. The user has to confirm permissions of the app using the API.