Question
· Mar 12

Get JWT Token

Hi Guys,

I'm trying both of these methods to get a JWT token but none is working for some reason and not sure what I'm missing?

it works when I tested it from Postman 

Thanks

Product version: Ensemble 2018.1
Discussion (12)3
Log in or sign up to continue

If it's null, your code might not even be getting to the Post method. Are you running this in the terminal, and are you getting any other errors there? Is your RTLS SSL configuration set up in the management portal?

Also, when the response comes back, it's JSON, so if you want to get just the token, you'd have to:

set tokenObj = ##class(%Library.DynamicObject).%FromJSON(AuthToken.HttpResponse.Data)
set AuthTokenValue = tokenObj.%Get("access_token")