Hi, I'm trying to write a PHP script which will allow a server to pull AdSense data when it's run. I managed to get this working via Google Sheets & App Script, but I'm having trouble even understanding how to authenticate when doing so via PHP.
Could somebody point me to a step-by-step process which will allow me to authenticate my server-side script and pull a basic dataset from AdSense?
Some questions I have:
- What credentials do I need? (API Keys, OAuth 2.0 Client IDs, Service Accounts...)
- Where do I get these? (
here?)
- Any specific configuration I need?
- Can you show me the barebones PHP code which will take these credentials and authenticate the script?
I'm sure I'm not the first person to run into this type of problem, but for the life of me, I can't find a clear explanation of what I'm doing wrong.