Web Sdk Integration - Facing issue with JWT service created in my local


(Neha Sheikh) #1

Hi @Subrahmanyam ,

I have created JWT service in my local following the steps provided in documentation.
My jwt service is up and running. It is also creating the token to be used for connection with Bot.
My web application is also integrated with bot. Followed steps for web sdk integration.

My sts call is successful as shown:

But call for jwtGrant is failing as shown:
API called - https://<>/api/oAuth/token/jwtgrant


Why this api is called and how it affects bot connection.
Do you have any idea about why is this failing?

Neha Sheikh

(Subrahmanyam Donepudi) #2

@nehamsheikh This call fails when the koreAPIUrl is incorrect in the index.html file.


The jwtgrant endpoint uses the jwt token which is generated using the jwt service and sends back access token as the response.


Now the /rtm/start endpoint is called by using the using the access token as bearer and it returns the websocket URL using which the webSDK establishes the socket connection.


(Neha Sheikh) #3

My koreAPIUrl is correct.

I had previously used this KoreAPIURL for some other bot on same bot builder.
sts, jwtGrant, start - all api calls worked for the other application. I was using some other jwt service for that application.

I cannot use the same jwt service for my new application as it is owned by other application.

Please suggest if I am missing anything while creating jwtService? Are there any pre-requisites for the jwtService?
Bot builder and jwt service are on two different servers. We can use them independently, right?
Does Bot builder uses/makes call to jwtService?

Neha Sheikh

(Subrahmanyam Donepudi) #4

The approach is the same on the bot builder. The /sts api is called to get the jwt, the /jwtgrant is called to fetch the access token and then /rtm/start is called to fetch the ws url and then the ws connection is established.

The difference you find is that, on the bot builder, the bearer is passed to the /sts api in the request headers as opposed to sending the client ID and client secret in the Form data while connect to web/ mobile client channel.


archived #5

unarchived #6