Hi,
I'll be able to help you with this issue. You can take a look at our
PHP example code to help you get started. Per the README, you'll need to update your credentials file with the client ID, client secret, and redirect URL for OAuth to work properly. Since your error says "Login Required", my suspicion is that the redirect URL is not set to properly handle the OAuth flow. You'll need to enter the credentials of a user that has access to your AdSense account to complete the OAuth flow and make requests to the AdSense API.
Can you let me know if you've tried those steps?
Thanks,
Donovan McMurray, Ad Manager API Team
ref:_00D1U1174p._5001USwFmx:ref