How to create a Machine to Machine application with access to Management API and other Custom API

I have created a M2M app which gets me a Management API token to create a New M2M app. But these M2M app needs to be associated with Management API (with necessary scopes). It also needs to associate with our own API .

Using below command I get the access token from Management API.
–url ‘https://auth.mydomain.com/oauth/token
–header ‘content-type: application/x-www-form-urlencoded’
–data grant_type=client_credentials
–data ‘client_id=MQTYxxxxxxeMdcbl8PpVRoBpnwAj’
–data client_secret=Nxxxxxxxxxxxxxxxxxxxxxxxx

curl -X POST -H “Content-Type: application/json” -d ‘{“name”:“VENUS-AQS”,“description”:“Some description”,“app_type”:“non_interactive”,“allowed_clients”: ,“grant_types”:[“client_credentials”, “refresh_token”], “is_first_party”:true,“oidc_conformant”:true,“jwt_configuration”:{“lifetime_in_seconds”:36000,“scopes”:{},“alg”:“RS256”},“sso”:false,“cross_origin_auth”:false,“sso_disabled”:false,“custom_login_page_on”:false,“client_metadata”:{“client_name”: “MY LLC”, “account_id”: “S0000001”},“refresh_token”:{“rotation_type”:“rotating”,“expiration_type”:“expiring”,“leeway”:0,“token_lifetime”:86400,“infinite_token_lifetime”:false,“idle_token_lifetime”:46500,“infinite_idle_token_lifetime”:false}}’ --url https://mydomain.us.auth0.com/api/v2/clients --header ‘authorization: Bearer eyJh…’

I would like to know how to get M2M app associated with Management API and API 's what we have created.

Hi @santhoshk

You need to create a client grant (also from the management API) when you create the M2M application.

John

2 Likes

thanks john I will give it a try

1 Like

Let us know if you have any questions down the road!

Thanks a lot . I am able to create the M2M app with necessary grants and associate them with the API’s

1 Like

Perfect! Glad to hear that!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.