Hi Naveen,
I had the similar issue as yours and i managed to resolve it by using the pulldata("@javascript", "functions.js", "ReplaceWithYourFunctionName", pulldata("@property", 'token'), ${u_name}) in the XLS form which runs the JS function with the supplied token and username arguments. If you are using another method to extract and supply these parameters to your JS function, it would not work and hence throw the above invalid token error.
I hope that helps if you are still looking for a solution.