# How can we twitter OAuth without social login?

**URL:** <https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901>\
**Category:** Get Help\
**Tags:** twitter, oauth2, auth0\
**Created:** [May 17, 2021, 6:49am UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901 "2021-05-17T06:49:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![daiki44](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daiki44/32/29275_2.png) [@daiki44](https://community.auth0.com/u/daiki44)\
**Post date:** [May 17, 2021, 6:49am UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/1 "2021-05-17T06:49:59Z")

</div>

Hi.

I want to use Twitter OAuth with Auth0.  
But we don’t want to use the social login only using OAuth token and Twitter APIs.

Can we do that? If it is yes, how can we implement that?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 17, 2021, 1:38pm UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/3 "2021-05-17T13:38:19Z")

</div>

Hi @daiki44,

Welcome to the Community!

> [@daiki44](#):
>
> we don’t want to use the social login only using OAuth token and Twitter APIs.

To clarify, could you please explain your use case further? Will your app need to make API requests to Twitter? Or will users need to log in via Twitter?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![daiki44](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daiki44/32/29275_2.png) [@daiki44](https://community.auth0.com/u/daiki44)\
**Post date:** [May 17, 2021, 3:16pm UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/4 "2021-05-17T15:16:31Z")

</div>

Thank you for your quick response!

> could you please explain your use case further?

- Our App Login  
Another OAuth login (using LINE)

- Twitter OAuth  
For getting the user’s timeline (after line login). like the “connect your Twitter” button.

> Will your app need to make API requests to Twitter? Or will users need to log in via Twitter?

I need to make API requests to Twitter.

Thank you for your support!

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 17, 2021, 3:58pm UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/5 "2021-05-17T15:58:45Z")

</div>

Thanks for providing additional context!

To authenticate your app to use Twitter’s API, you can use the [Client Credentials Flow](https://auth0.com/docs/flows/client-credentials-flow). This must be done server-side since it will require using a client secret. Your API/backend can authenticate with Twitter directly with the Twitter `/token` endpoint:

> **[POST oauth2/token](https://developer.twitter.com/en/docs/authentication/api-reference/token)**

In your frontend application, you can register your custom API and use its identifier as the `audience` in your app. When a user logs in, they will be issued an Access Token which your backend can validate before authenticating with Twitter.

> **[Register APIs](https://auth0.com/docs/get-started/auth0-overview/set-up-apis)**
>
> Learn how to register APIs in the Auth0 Dashboard.

---

<div class="post-metadata">

**Author:** ![daiki44](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daiki44/32/29275_2.png) [@daiki44](https://community.auth0.com/u/daiki44)\
**Post date:** [May 18, 2021, 1:52am UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/6 "2021-05-18T01:52:55Z")

</div>

Thank you for your answer!  
I will try it.

I have one more question.  
Should we create two applications in Auth0? Is it correct? (1. LINE Login, 2. Twitter OAuth)

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 18, 2021, 12:30pm UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/7 "2021-05-18T12:30:23Z")

</div>

Not a problem!

> [@daiki44](#):
>
> Should we create two applications in Auth0?

For this set up, you will only need one application and one [API](https://auth0.com/docs/get-started/set-up-apis?_ga=2.16459445.2047594292.1621254077-1595415333.1607347674&_gac=1.28184910.1620663261.Cj0KCQjws-OEBhCkARIsAPhOkIbhK13acrxZIWhKyPE4GlpGf7ZKmKpxtmuQbD_VcaLmyScFgvNZcmAaAntFEALw_wcB). Your backend can retrieve an Access Token directly from Twitter by using the client credentials grant, and so you won’t need to set up an application in Auth0 for it.

By setting up an API in Auth0, you can ensure that any of your API endpoints will only be used by logged-in users.

---

<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:** [June 2, 2021, 12:30pm UTC](https://community.auth0.com/t/how-can-we-twitter-oauth-without-social-login/62901/8 "2021-06-02T12:30:51Z")

</div>

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