I had the exact same problem - NOT_ADS_USER 

If you indeed completed all the prerequisites 
<https://developers.google.com/google-ads/api/docs/oauth/service-accounts#prerequisites>
 and 
the succeeding steps 
<https://developers.google.com/google-ads/api/docs/oauth/service-accounts#setting_up_service_account_access>,
 
including this section 
<https://developers.google.com/google-ads/api/docs/oauth/service-accounts#granting_impersonation_abilities>,
 
and still have the error - 
the problem might be that you are creating the access_token in the wrong 
way. Try using this code (it's in nodejs but easily applied in all 
languages) 

*const private_key = require('./key.json').private_key;*
*const token = jwt.sign(*
*{*
*iss:*
*SERVICE_ACCOUNT_EMAIL,*
*sub: GOOGLE_MMC_MANAGER_EMAIL,*
*scope: 'https://www.googleapis.com/auth/adwords 
<https://www.googleapis.com/auth/adwords>',*
*aud: 'https://oauth2.googleapis.com/token 
<https://oauth2.googleapis.com/token>',*

*exp: Math.round(Date.now() / 1000) + 3600,*
*iat: Math.round(Date.now() / 1000),*
*},*
*private_key,*
*{ algorithm: 'RS256' },*
*);*

*// console.log(token);*

*try {*
*const response = await http.post 
<http://http.post/>('https://oauth2.googleapis.com/token 
<https://oauth2.googleapis.com/token>', {*
*grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',*
*assertion: token,*
*});*
*const access_token = response.data;*
*console.log(access_token);*
*} catch (error) {*

*console.log(error.data);*
*}*
*};*

*// Make an authorized request with the access_token*

hope it will help as it helped me

On Wednesday, October 7, 2020 at 1:43:48 PM UTC+10 adsapiforumadvisor wrote:

> Hi Thijs,
>
> The NOT_ADS_USER should point to an issue with user that was logged in 
> while creating the service account. Errors related to the developer token 
> and customerID should return a different error.
>
> Moving forward, could you also confirm if all the prerequisites 
> <https://developers.google.com/google-ads/api/docs/oauth/service-accounts#prerequisites>
>  
> and the succeeding steps 
> <https://developers.google.com/google-ads/api/docs/oauth/service-accounts#setting_up_service_account_access>,
>  
> including this section 
> <https://developers.google.com/google-ads/api/docs/oauth/service-accounts#granting_impersonation_abilities>,
>  
> were completed correctly when you generated your service account 
> credentials?
>
> If all requirements and steps were followed and you continue to encounter 
> the issue, you may send all the private details such as the complete 
> request and response logs, your customer ID, and the user (email address) 
> that you used to generate your service account, to our support alias (
> [email protected]), so we can discuss in private.
>
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence Napa Oliquino 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q25Z2u8:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/af78c754-76bb-4b0d-b354-101fc0de2fb4n%40googlegroups.com.

Reply via email to