First I don't know why you are using your own API project, you shouldn't!
Please try to edit your post and remove everything above last error (if you could wrap it in a code tag will be great).
Finally, that error is a sign of server misconfiguration, so you should contact your hosting provider regarding that.
Here's how one of my users managed to fix it: https://deconf.com/ask/question/google-analytics-dashboard-for-wp-unable-to-authorize-plugin/