# Machine to Machine application cannot retrieve API token

**URL:** <https://community.auth0.com/t/machine-to-machine-application-cannot-retrieve-api-token/73053>\
**Category:** Get Help\
**Tags:** api, machine-to-machine\
**Created:** [November 12, 2021, 3:07pm UTC](https://community.auth0.com/t/machine-to-machine-application-cannot-retrieve-api-token/73053 "2021-11-12T15:07:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonzalo.hirsch](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gonzalo.hirsch/32/32629_2.png) [@gonzalo.hirsch](https://community.auth0.com/u/gonzalo.hirsch)\
**Post date:** [November 12, 2021, 3:07pm UTC](https://community.auth0.com/t/machine-to-machine-application-cannot-retrieve-api-token/73053/1 "2021-11-12T15:07:54Z")

</div>

Hi, I’m working on implementing a Machine to Machine application in a server to communicate with an internal API. I followed the steps on the Auth0 page but I still get a 401 when the token is requested using an axios POST.

My M2M application is already authorized for the API, and requesting the token via the cURL sample in the Dashboard works properly.

Can I get some help with this?

---

<div class="post-metadata">

**Author:** ![gonzalo.hirsch](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gonzalo.hirsch/32/32629_2.png) [@gonzalo.hirsch](https://community.auth0.com/u/gonzalo.hirsch)\
**Post date:** [November 12, 2021, 3:37pm UTC](https://community.auth0.com/t/machine-to-machine-application-cannot-retrieve-api-token/73053/2 "2021-11-12T15:37:31Z")

</div>

I solved it, it appears it was a problem with axios, not related to Auth0

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 25, 2021, 10:23am UTC](https://community.auth0.com/t/machine-to-machine-application-cannot-retrieve-api-token/73053/3 "2021-11-25T10:23:06Z")

</div>

Perfect! Glad you have figured it out!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 25, 2021, 10:23am UTC](https://community.auth0.com/t/machine-to-machine-application-cannot-retrieve-api-token/73053/4 "2021-11-25T10:23:09Z")

</div>


