Closed Deepa1804 closed 2 years ago
Hi @Deepa1804 I'm afraid I did not get the issue, could you provide more details please?
The issue here is, the user has to call initBot to load config. Without running initBot i cannot call SymBotClient.authenticateExtApp = () => { or SymBotClient.authenticateOboApp = () => { A call to initBot without having bot configuration in the config file fails and if I need only extension app without a BOT the call to the above function SymBotClient.authenticateExtApp fails.
Below is the modification i had to add in to get the function working SymBotClient.authenticateExtApp = (pathToConfigFile) => { return SymConfigLoader.loadFromFile(pathToConfigFile).then(SymConfig => { SymBotClient.config = SymConfig return SymBotAuth.extAppAuthenticate(SymBotClient.config).then(symAuth => { return { appId: symAuth.appId, tokenA: symAuth.appToken } }) } }
Closing this as we are not actively maintaining this BDK anymore
https://github.com/SymphonyPlatformSolutions/symphony-api-client-node/blob/9bb4d08387d2d4d8248bce4b48d1002e0e4a24c6/lib/SymBotClient/index.js#L48
SymBotClient.authenticateExtApp = (pathToConfigFile) => { return SymConfigLoader.loadFromFile(pathToConfigFile).then(SymConfig => { SymBotClient.config = SymConfig return SymBotAuth.extAppAuthenticate(SymBotClient.config).then(symAuth => { return { appId: symAuth.appId, tokenA: symAuth.appToken } }) } }