# Auth/token endpoint get status 500

**URL:** <https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [January 24, 2024, 10:47am UTC](https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569 "2024-01-24T10:47:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eden.amram](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@eden.amram](https://community.auth0.com/u/eden.amram)\
**Post date:** [January 24, 2024, 10:47am UTC](https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569/1 "2024-01-24T10:47:37Z")

</div>

I want to create my design for my login and still use Auth0 authentication.  
Im trying to get the token with the client’s email and password, and i get status 500.  
i work with Nodejs and this is my code:

function options(email, password) {  
return {  
method: ‘POST’,  
url: `https://${auth0Config.auth0Domain}/oauth/token`,  
headers: { ‘content-type’: ‘application/x-www-form-urlencoded’ },  
data: new URLSearchParams({  
grant\_type: auth0Config.grant\_type,  
client\_id: auth0Config.client\_id,  
client\_secret: auth0Config.client\_secret,  
audience: auth0Config.audience,  
username: email,  
password: password,  
scope: ‘read:sample’  
})  
}  
};

async function findTokenWithPassword(email, password) {  
try {  
const option = options(email, password);  
const response = await axios.request(option);

```
    if (!response.status === 200) {
        throw new Error('Invalid password/username');
    }

    return response;
} catch (error) {
    throw error;
}

```

}

I appreciate getting any help.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 24, 2024, 1:04pm UTC](https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569/2 "2024-01-24T13:04:07Z")

</div>

Hi @eden.amram

Welcome to the Auth0 Community!

We are investigating this issue. I will update you as soon as I will have more details.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![eden.amram](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@eden.amram](https://community.auth0.com/u/eden.amram)\
**Post date:** [January 24, 2024, 1:26pm UTC](https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569/4 "2024-01-24T13:26:12Z")

</div>

Thank you.

I just got the answer after many hours!

I added this and it fixed the problem:

 ![Screenshot 2024-01-24 153047](https://global.discourse-cdn.com/auth0/original/3X/f/c/fc967c02e76671444528c7188866ee8dccfeff1d.png)

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 24, 2024, 1:29pm UTC](https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569/5 "2024-01-24T13:29:32Z")

</div>

Thank you for the update for the rest of the community!

I’m glad you found the solution to your issue.

Thanks  
Dawid

---

<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:** [February 7, 2024, 1:29pm UTC](https://community.auth0.com/t/auth-token-endpoint-get-status-500/125569/6 "2024-02-07T13:29:47Z")

</div>

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