Search code examples
djangoreactjstwitterdjango-rest-frameworkdjango-oauth

Is it possible to get twitter access_token without Backend?


I am trying to build an app which has Django DRF Backend and React Frontend. I used 'oauth2_provider' and 'rest_framework_social_oauth2' on Backend.

I succeeded to get the facebook access_token by only using React Frontend. Send it to Backend and get the converted token.

In case of twitter, is it possible to get tha access_token by only using React?

Looking forward to your adivce. :)


Solution

  • After a few days of survey, I found that Twitter access_token have to be obtained on backend.

    On frontend, can send request and 200 response but browser shows CORS error.

    I guess it means that request for Twitter access_token should be sent from backend, not from browser.

    I've succeeded to get Twitter access_token on Backend(Python/Django).