For the Oauth 2.0 Authentication is anybody able t...
# suitetalkapi
k
For the Oauth 2.0 Authentication is anybody able to get Refresh Tokens programmatically when they expire after 7 days or is the only option to do so manually at this point?
b
The Refresh Token POST Request to the Token Endpoint documents that you have to complete the flow again to get a new refresh token
k
@battk yea so there's just no way around needing that manual step each week right? Is this normal? This is the first time I've come across something like this and I have recently integrated with a couple other ERP systems REST APIs.
b
Abnormal
k
yea and even if it was short lived that'd be fine if there was a programmatic way to get a new refresh token, but hard to recommend going down an integration approach that requires manual steps to maintain every week
i
Well, I know I thought this was the same with QuickBooks Online, but I found that if you keep refreshing your access token using your refresh token periodically, I havent had a need to re-authorize my applications with QBO at all. Knock on wood You do need to check if the refresh_token changes and store that to make the refresh happen. Couldnt you use Token Based Access instead of the full user Oauth? Or is your app more user-facing?
k
is there a REST endpoint for Token Based Authentication? The Oauth approach seemed the most intuitive (and possibly only?) to go along with using the REST Record Service
b
Token-based Authentication is what I would recommend
The Three-Step TBA Authorization Flow should be familiar to the OAuth 2.0 flow
its probably harder to implement since it uses actual crypto
if you arent building a suiteapp to be used in multiple accounts, then there are options for Managing TBA Tokens in the NetSuite UI
k
ok will try this out, thanks
@battk it looks like step 2 requires user intervention so this wouldn't solve for long term programmatic authentication only
b
its a one time thing
user authorizes your application once
k
ah nice
c
100% i'd use TBA for all static integration
k
cool - thanks for all the help guys. Stuck on TBA Step 3 in Postman but prob just some param I have off
c
The netsuite doc isn't bad for it. Just create the keys and then plug everything into postman as it asks for it. If you're getting errors, you've done something stupid most likely
k
lol
i
I had trouble with postman not creating the signature correctly, I eventually got it to work in c# just fine.
k
got it working in postman