Skip to content

Azure Communication Service - While creating ChatThreadClient, getting error 401 #1559

@salujamanish

Description

@salujamanish

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions