oauth2l tool error: missing 'type' field in credentials

560 views
Skip to first unread message

TM Drift

unread,
Nov 29, 2023, 3:39:40 AM11/29/23
to Google Ads API and AdWords API Forum
I am trying to follow the direction on https://developers.google.com/google-ads/api/docs/get-started/make-first-call#fetch_a_refresh_token using the oauth2l tool to generate a refresh token.

However I get the mentioned "missing 'type' field in credentials" error.

To the best of my knowledge I have follow the directions exactly, so I am at a loss as to why it does not work.

Can anyone help me out please? 

Dane christian Neilson

unread,
Nov 29, 2023, 4:04:50 AM11/29/23
to Google Ads API and AdWords API Forum

MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
LOAN DEAL
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
IPIP/DTC
SLBC PROVIDER
CREDIT CARD TOP UP
DUMPS/ PINS
SEPA TRANSFER
WIRE TRANSFER
BITCOIN TOP UP
GLOBALPAY INC US
SKRILL USA
UNIONPAY RECEIVER

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP
+14234753476

Google Ads API Forum Advisor

unread,
Nov 29, 2023, 7:45:32 AM11/29/23
to dr...@travelmarket.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your query, I understand that you are encountering an issue with the 'oauth2l' tool while trying to generate a refresh token for the Google Ads API. The error "missing 'type' field in credentials" usually indicates that there might be an issue with the structure or content of the credentials JSON file. Could you please confirm whether you have followed all the prerequisites before executing the command? Ensure that the downloaded credentials JSON file is in the correct format. Kindly check the required fields are present in your credentials JSON file. The error may be triggered if a required field is missing. If the issue persists, try regenerating the credentials JSON file from the Google Cloud Console. Make sure to download the JSON file again and use the new one. Also, you refer to this youtubte video to know more about how authentication and authorization work in the Google Ads API.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qVYIl:ref"

Thanks,
 
Google Logo Google Ads API Team


TM Drift

unread,
Nov 29, 2023, 11:39:42 AM11/29/23
to Google Ads API and AdWords API Forum
I can confirm that I have;
  1. gotten a developer token
  2. set up a Google API Console project
  3. created a consent screen
  4. gotten a client ID and a client secret
  5. downloaded the credentials file from the page in step 4
The credentials file contains the following nodes (real values replaced of course);

{
"web": {
"client_id":"XXXXXXXXXXXXXXXXXX.apps.googleusercontent.com",
"project_id":"XXXXXXXXXXXXXXX",
"auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
"client_secret":"XXXXXXXXXXXXXXXXXXXXXX"
}
}

Google Ads API Forum Advisor

unread,
Nov 29, 2023, 8:01:36 PM11/29/23
to dr...@travelmarket.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Could you please confirm with us whether the refresh token has been generated or not? If you are still facing issues while generating the refresh token, provide us with the complete API logs (request and response with request-id and request header) generated at your end along with the screenshot of the error message.
 
You can send the details via Reply privately to the author option, or direct private reply to this email.

TM Drift

unread,
Nov 30, 2023, 9:12:33 PM11/30/23
to Google Ads API and AdWords API Forum
The refresh token has not been generated - that is what I am trying to do following the directions here: https://developers.google.com/google-ads/api/docs/get-started/make-first-call

However, as stated, when I try to run the oauth2l tool, I get the "missing 'type' field in credentials" error.

Google Ads API Forum Advisor

unread,
Dec 3, 2023, 9:29:37 PM12/3/23
to dr...@travelmarket.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Could you please provide us with the complete API logs (request and response with request-id and request header) generated at your end along with the screenshot of the error message for further investigation.

TM Drift

unread,
Dec 4, 2023, 5:32:16 AM12/4/23
to Google Ads API and AdWords API Forum
As I have now stated a couple of times, I have not made it to the point where I can try to make requests.

I am stuck at the point where I am trying to fetch a refresh token as stated here: https://developers.google.com/google-ads/api/docs/get-started/make-first-call.

fetch.png

And here is what happens when I try to run the described command:

error.png

Google Ads API Forum Advisor

unread,
Dec 4, 2023, 10:32:39 PM12/4/23
to dr...@travelmarket.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Upon checking further, I understand that you are unable to generate a refresh token. I would suggest you kindly reach out to the GCP Product support team for further assistance on this issue.
Reply all
Reply to author
Forward
0 new messages