azure-docs-sdk-java icon indicating copy to clipboard operation
azure-docs-sdk-java copied to clipboard

Azure Communication Service - While creating ChatThreadClient, getting error 401

Open salujamanish opened this issue 4 years ago • 0 comments
trafficstars

Hi Team,

I am following https://github.com/Azure/azure-docs-sdk-java/blob/master/docs-ref-services/communication-chat-readme-pre.md to setup chat client for azure communication service using Java Sdk.

I am able to get valid user access token but when I am trying to create chat thread using ChatThreadClient chatThreadClient = chatClient.createChatThread(createChatThreadOptions);

I am getting below exception

Exception in thread "main" com.azure.communication.chat.models.ErrorException: Status code 401, (empty body) at java.lang.Thread.run(Thread.java:748) Suppressed: java.lang.Exception: #block terminated with an error at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99) at reactor.core.publisher.Mono.block(Mono.java:1680) at com.azure.communication.chat.ChatClient.createChatThread(ChatClient.java:59) at App.main(App.java:59)

salujamanish avatar Dec 03 '20 07:12 salujamanish