i am generaing access token from below functions but getting error like
this "*The Google account (@gmail.com <http://gmail.com> user) that
generated the OAuth access tokens is not associated with any Ads accounts.
Create a new account, or add the Google account to an existing Ads account*"
how can i fix this. Please help me ASAP

function createJwtAssertion() {
const jwtAssertion = jwt.sign({
iss: clientId, // Client ID
scope: "https://www.googleapis.com/auth/adwords";,
aud: 'https://oauth2.googleapis.com/token', // Token endpoint
exp: Math.floor(Date.now() / 1000) + 3600, // Expiration time (1 hour from
now)
}, clientSecret, { algorithm: 'RS256' }); // Use your actual signing
algorithm
return jwtAssertion;
}

const token = await axios.post('https://oauth2.googleapis.com/token', null,
{
params: {
assertion: assertion,
grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
},
});

On Tue, 2 Jan 2024 at 17:42, Google Ads API Forum Advisor
<[email protected]> wrote:

> Hi,
>
> Thank you for getting back to us.
>
> Based on the information you have provided I understand that you are
> trying to get the refresh token. I would suggest you to refer to the Fetch
> a refresh token
> <https://developers.google.com/google-ads/api/docs/get-started/make-first-call#fetch_a_refresh_token>
>  for
> more information.
>
> This message is in relation to case "ref:!00D1U01174p.!5004Q02r4kZ4:ref"
>
> Thanks,
>
> [image: Google Logo] Google Ads API Team
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/CALswdxfgJmV0oK0h4ng5TxzLCJr1gpq98BWFQU008d_cMz45Og%40mail.gmail.com.
  • Go... Mehul Panchal
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Mehul Panchal
        • ... Mehul Panchal
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
            • ... Mehul Panchal
              • ... Mehul Panchal
                • ... Mehul Panchal
                • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to