# Best Practice for Public API

**URL:** <https://community.auth0.com/t/best-practice-for-public-api/18393>\
**Category:** Get Help\
**Tags:** machine-to-machine-a, api\
**Created:** [November 27, 2018, 4:12pm UTC](https://community.auth0.com/t/best-practice-for-public-api/18393 "2018-11-27T16:12:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad-flowhub](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brad-flowhub/32/9823_2.png) [@brad-flowhub](https://community.auth0.com/u/brad-flowhub)\
**Post date:** [November 27, 2018, 4:12pm UTC](https://community.auth0.com/t/best-practice-for-public-api/18393/1 "2018-11-27T16:12:40Z")

</div>

We are in the process of implementing Auth0 as the authentication mechanism for a publicly facing API. It seems from the Auth0 documentation shows that we should create a separate application (Machine to Machine) for each client that will be generating Access Tokens for the given API. This all makes sense, and we have this portion up and running. My question is… Is this the best practice for long term / many consumers of the api. It seems that we could quickly have 100s of clients and thus 100s of Applications defined in Auth0 for consumers.

Would enjoy hearing others feedback. Does anyone have a better management strategy? How many MTM applications / consumers do you all have?

Thanks  
Brad

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 27, 2018, 9:02pm UTC](https://community.auth0.com/t/best-practice-for-public-api/18393/2 "2018-11-27T21:02:46Z")

</div>

Hi Brad.  
Your approach is the correct one.  
There’s no hard limit on the number of clients defined, but I agree that the Dashboard experience is not ideal at this moment for hundreds or thousands of objects. The API v2 generic endpoints (like “get all applications”) might also be unsuitable for the task, but those that operate by individual client id should work perfectly.

Because of the above at this moment I would recommend that you keep a record of the generated `client_id`s on your side (e.g. at least a record of which `client_id` was created for each of your customers), so that you can use the management API to get/update/delete the application by ID without involving the dashboard.

I would also encourage you to leave feedback at [Auth0: Secure access for everyone. But not just anyone.](https://auth0.com/feedback) describing your use case, so that the Product team can prioritize this need over others and put this scenario on the roadmap.

Best,  
Nico

---

<div class="post-metadata">

**Author:** ![brad-flowhub](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brad-flowhub/32/9823_2.png) [@brad-flowhub](https://community.auth0.com/u/brad-flowhub)\
**Post date:** [November 27, 2018, 9:19pm UTC](https://community.auth0.com/t/best-practice-for-public-api/18393/3 "2018-11-27T21:19:52Z")

</div>

Nico,

Thank you for your feedback and the suggestion of us storing the client\_id. We do anticipate using the Auth0 v2 api endpoints for some automation in our processes.

Thank you  
Brad

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 27, 2018, 9:19pm UTC](https://community.auth0.com/t/best-practice-for-public-api/18393/4 "2018-12-27T21:19:56Z")

</div>

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