0

Im trying to connect to Netsuite using flutter and struggling to understand how I can do oauth. In python I do this:

from requests_oauthlib import OAuth1Session
import os

oauth = OAuth1Session(
    client_key=os.environ['NETSUITE_CLIENT_KEY'],
    client_secret=os.environ['NETSUITE_CLIENT_SECRET'],
    resource_owner_key=os.environ['NETSUITE_TOKEN_KEY'],
    resource_owner_secret=os.environ['NETSUITE_TOKEN_SECRET'],
    realm='123456')

 r = oauth.get(
        url,
        headers={'Content-Type': 'application/json'},
        params=params
    )

How do I do something like this in dart? I was guessing the oauth2 library is the answer but I have no clue how to get it to work. How do I go about this

West
  • 2,350
  • 5
  • 31
  • 67
  • Does this answer your question? [Google & Microsoft OAuth2 login flow Flutter Desktop (MacOS, Windows, Linux)](https://stackoverflow.com/questions/68716993/google-microsoft-oauth2-login-flow-flutter-desktop-macos-windows-linux) – Oded Ben Dov Jul 20 '22 at 11:24
  • Hi unfortunately no. The solution involves opening a browser, starting a server etc which is not what the python library does as it uses api keys so no need for a browser. – West Jul 20 '22 at 14:30

0 Answers0