How to generate JWT tocken for Bot?

Access to XMLHttpRequest at ‘’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Here i am new to the this feild can anyone help me to clear my doubt how to generate JWT tockens and what can be give in botOptions.JWTUrl = “”.2021-02-03

Please check out Getting started with widget sdk (v7.2 onwards)

or Facing issue while integrating bot with web/mobile client channel

Please note - JWT hosting needs to be done at dev/ customer’s end.
This may be helpful in setting it up.

In case you want to obfuscate your client id and secret and not expose to users, you can refer this update on below thread. Required c# code instead of Js functions for Kore bot Implementation

i don’t know what is wrong but i am getting this error please help me out to solve?2021-02-03 (1) 2021-02-03 (1)

hi can you help me to get any jwt url so that i can check as when i open the link http://localhost:3000/api/users/sts it is not providing any output?

  1. SDKApp is a node program/ service. Have you done npm install and installed all dependencies; node startServer.js (as described in step 25 and 26 of The links already shared should have taken you to this page too)?
  2. I see you are using 8080 to server index.html but your jwt is probably on 3030, while that does not make any difference, just ensure local jwt is running.
  3. You will not be able to open the link http://localhost:3000/api/users/sts as is. It is not a supposed to be a get method call and needs a payload.
    Please go through all the links presented and do step by step. Use the documentation link in point 1.

is webSDK or SDKApp both are different we have to follow both or just i m doing it with only webSDK is correct? Sorry for this stupid question…:stuck_out_tongue:


WebSDK consumes JWT service.
JWT gives -

  1. A Demo JWT service
  2. A demo local server to serve the content of index.html.

Hope this helps.

2021-02-04 can you help me
Getting this error now

Can you show the network tab (instead of vonsole) what is the response for jwtgrant?
Ensure you have published your bot.

2021-02-04 (1) 2021-02-04 (2)
here is the network tab saying Client error

What this means is that the client id and secret you are using are not the ones from the app that is published (assuming) with the bot’s web/mobile channel.
You will need to ensure same client id, secret, botid combination is used and it is in sync with bot’s channel and web-sdk. Also publish is important.

1 Like

Hi Again, I have mapped bot id n other things well tried 2-3 time with different bots still facing this issue. Kindly help me out Annotation 2021-02-08 084853 Annotation 2021-02-08 084923