Can I decode a VANTIQ token to see what namespace it is for?

I used a secure file to store some of my VANTIQ tokens in.  But I forgot to label the tokens so I am not sure which token was good for which namespace.  Is there a way to get that information from the token?

Posted: July 29, 2020 at 8:31 pm
Replies: 1
Jul 29, 2020
Posted by Ken

There is no way to “decode” the token but you might be able to call a VANTIQ procedure that will return the profile and namespace information associated with the token.  To do this you must do the following:

1. Use the VANTIQ installation where the token came from (e.g. https://dev.vantiq.com)

2. Install the version of the CLI that goes with the VANTIQ version that you are using.

Run a CLI command like this to test the credentials/token you are using:

vantiq -b https://dev.vantiq.com -t aJl98y53Uqmob5amRjJWmgNOA3YI98hy65rewsdrt6w= execute Utils.getNamespaceAndProfiles

You should get output like this:

{
    "profiles": [
        "PumpMonitoring.admin",
        "PumpMonitoring.admin__system"
    ],
    "namespace": "PumpMonitoring"
}

Of course, replace the token shown above with your token.
 

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy