I'm reposting because the other cases where this issue was reported have not solved my problem. Right now I'm just trying to get a refresh_token that can later be used in a gcp cloud function to call the directory API. However the following curl command fails:
$ curl -d "my_client_id&scope=https://www.googleapis.com/auth/admin.directory.user" https://accounts.google.com/o/oauth2/device/code
With the following error:
{
"error" : "invalid_client",
"error_description" : "The OAuth client was not found."
}
Things I have tried:
Anyone here have any good ideas?
Turns out there was a typo in my client id from using the up arrow (command history) on mac which wasn't visible until pressing enter and reviewing the command after execution.
Also found out that this scope (admin.directory) cannot be used with https://accounts.google.com/o/oauth2/device/code since devices are considered insecure, so only a limited set of scopes are allowed.