на основе https://developers.google.com/gmail/api/v1/reference/?apix=true Я нахожусь в
https://console.developers.google.com/apis/credentials?project=ancient-ensign-250203
Я установил учетные данные и получил "clientId" и
Также получите этот crypti c json file
{"type": "XXX", "project_id": "XXX", "private_key_id": "XXX", " private_key ":" XXX "," cli ent_email ":" XXX "," client_id ":" XXX "," auth_uri ":" XXX "," token_uri ":" XXX "," auth_provider_x509_cert_url ":" XXX "," client_x509_cert_url ":" XXX ",}
когда я cURL
curl -X GET https://www.googleapis.com/gmail/v1/users/305074269639-iuhtjs8pshlf84t9m3jl92c5h6mbqd28.apps.googleusercontent.com/drafts
не работает, с сообщением Результат:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
какие-либо предложения?