Hi Ankit,
Thank you for reaching out. AuthenticationError.OAUTH_TOKEN_INVALID error occurs when OAuth access token in the header is not valid. Could you please make sure that you generate the OAuth2 credentials using the email that has admin or standard access to the manager account? If it is confirmed, please follow this guide to re-generate the OAuth2 credentials and try it again. Please let me know if the issue persists.
Thanks and regards,
Xiaoming, Google Ads API Team
Hi Ankit,
Thank you for reaching out. Please take a look at the source code in the try catch block in this code example on how to catch the OAuthException.
Thanks and regards,
Xiaoming, Google Ads API Team