OAuth will non activate

I’m trying to get my Parent App to pull the access token… it tells me that OAuth is not activated and to go to the IDE… I can assure you, It’s activated…

Any ideas what would keep the OAuth from working?

Not sure of the details of your SmartApp, but mentioning that it is a Parent must be important…

So obvious question… Do all the Child SmartApps have OAuth enabled?

Which SmartApp (Parent or Child) has incoming connections??

The parent will have the incoming data… the parent will then send that to the appropriate child app.

Well… Enable OAuth in the child SmartApp(s) anyway… Worth a try.

Whatever ‘tells’ you that OAuth is not activated is lying to you.

1 Like

Within the app if you do a

if (!state.accessToken)....

if it comes back with anything other than the token, that means OAuth is not enabled…Is this a new issue or has it always been an issue? I assume you could not have tested this very much if it has never worked.

1 Like

That is actually the line that is throwing the error.
Take out the ! And the line is fine.

The ide says it’s on.

The OAuth is on, but you need to create a token first

def OAuthToken(){
try {
createAccessToken()
log.debug “Creating new Access Token”
} catch (e) {
log.error “Access Token not defined. OAuth may not be enabled. Go to the SmartApp IDE settings to enable OAuth.”
}

2 Likes