Create application/client and authorize for APIs using Management API

@ofjansen

The page @konrad.sopala linked has what you are looking for :slight_smile:

There is a section (Update Grant Types) on how to authorize an Application for a given API (audience) using the Management API (Auth0 Management API v2). This is what you’re looking for.

We use something along the lines of (Node.js SDK):

return ManagementClient.createClient(params)
  .then((client) => {

    ManagementClient.createClientGrant({
      client_id: client.client_id,
      audience: audience,
      scope: ["sample-scope"]
    });

    return client;
  });