Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

INSUFFICIENT_PERMISSION while call API accounts:sendOobCode

cg10
New Member

The curl

curl --location 'https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=[API-Key]&tenantId=[tenant-id]' \
--header 'Content-Type: application/json' \
--data-raw '{
"requestType": "PASSWORD_RESET",
"email": "[email]",
"returnOobLink": true
}'

 

The API key has the required identity toolkit permission 

cg10_0-1697099121145.png

but despite of it I am getting error 

{
"error": {
"code": 400,
"message": "INSUFFICIENT_PERMISSION",
"errors": [
{
"message": "INSUFFICIENT_PERMISSION",
"domain": "global",
"reason": "invalid"
}
]
}
}

Please help me know where I am wrong?

 

1 1 807
1 REPLY 1

Greetings @cg10,

Welcome to the Google Cloud Community!

You can try the following troubleshooting options:

  1. Make sure that you are using the correct API_KEY, or if you're passing it correctly to your [API-Key]. To manage API keys, you must also have the API Keys Admin role (roles/serviceusage.apiKeysAdmin) on the project.
  2. Try to look at this related GCC Post as you might have the same problem. 
  3. If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!
Top Labels in this Space
Top Solution Authors