Hi Amit,
Check out this similar example on the Developer Center:
https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/authenticatedMessenger
In the example I linked, `AuthProvider.registerCommand` is called outside of the `Auth.subscribe` function call, whereas in your example it is called inside the `Auth.subscribe` function. I think you need to register the 'getTokens' command outside of the 'subscribe' block, then call `AuthProvider.command('getTokens')` in the `Auth.subscribe` callback.
------------------------------
Jacob Shaw
Sr. Software Engineer
------------------------------
Original Message:
Sent: 10-13-2025 12:02
From: Amit Akela
Subject: Trying to call the Auth.getTokens command from a webpage hosting the web messenger script but its failing. Please suggest if the syntax is not correct ?

#Integrations
#PlatformAPI
#WebMessaging
------------------------------
Amit Akela
------------------------------