Reporting a bug with the 'connect' function on Sendbird Chat SDK

Hello Sendbird, I’m a developer and I wanted to report a bug found on the iOS Sendbird Chat SDK, in the method ‘connect’ that I use, I put a proxy to redirect the request to my own custom server. The string introduced is something like this “https://[baseUrl].pt/chat/api" (this is the proxy url put on the arg apiHost in the method connect), and using a proxy application locally to see where the requests go to, I noticed the path from the SDK request was using only the baseUrl from the proxy that was given and not the full proxy url with the paths. Here’s an example of what is expected and what occurs:

Expected: “https://[baseUrl].pt/chat/api/v3/users/[userID]/my_group_channel/(…)"

What happened: “https://[baseUrl].pt/v3/users/[userID]/my_group_channel/(…)”

It removed the paths from the full proxyUrl, the url is a static variable, and its unchanged through out the code. The requests that do this are all internal requests done by the SDK, and the only usage/assignment of the proxy url to the SDK is in the ‘connect’ function.

The function in question is this one:
/// Performs a connection to Sendbird with the user ID and the access token.
///
/// - Parameters :
/// - userId: user ID
/// - authToken: authToken
/// - apiHost: apiHost. Internal use only.
/// - wsHost: wsHost. Internal use only.
/// - completionHandler: completionHandler
/// - Seealso : connect(userId:authToken:completionHandler:)
@objc public static func connect(userId: String, authToken: String?, apiHost: String?, wsHost: String?, completionHandler: SendbirdChatSDK.UserHandler? = nil )

Hope to have a response on this from you, as quickly as possible!

I’m using the SendbirdChatSDK v4.21.10

[Frequency] // How frequently is this issue occurring?
This issue is always happening since the implementation of the proxy.

[Current impact] // How is this currently impacting your implementation?
This issue is impacting very must my implementation.

@Raul_FIGUEIREDO Hi there.

I know that it has been some time since you wrote this. I’m wondering if you are still considering Sendbird given that you couldn’t get the apiHost to work in the way that you needed.

I think my concern is that those items are marked as Internal use only, and there was an expectation on your side to be able to use them. Did you discuss with anyone at Sendbird about their usage availability please?

@Jason Hello there.

Im still considering using Sendbird as a messaging platform for my app, I think is a good choice, but this issues can put me off a bit.

I’ve been discussing this with support at Sendbird, for now I believe that is on the works, when the issue is resolved I will update this post too. For not im working with the apiHost at nil.

I think I handerstand what you’re saying, that the function/code shouldn’t be public, but it does help in my development, and for an example it does work well in Android. In there it doesn’t cut the path from the used proxy.

To finalize, probably should create a new post for this, but there is no way to set a custom SSL Certificate(s), this is associated with the proxy because the communication requires it, there for I’m putting the issue here.

Thank you for the concern.