Authorizing a non-interactive client for an API

I have created a new non-interactive client via the management API.
But when I try to do a client credentials grant, I get the following error:

  "error": "access_denied",
  "error_description": "Client is not authorized to access"

It seems like I need to manually click the authorize button in the dashboard to enable this client to access my API. How do I do this via the management API? I’m creating hundreds of non-interactive clients, and cannot do this manually.


For client-credentials grant flows you need to authorize clients for access to the API, and for which scopes they may be granted. Through the Management API, this is represented by the client grants API endpoint documented here: /api/v2/client-grants.