[GH-ISSUE #664] changes in API for self-hosted? #26766

Closed
opened 2026-04-18 10:04:37 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @pdarcos on GitHub (Dec 4, 2019).
Original GitHub issue: https://github.com/bitwarden/android/issues/664

Hi,

I noticed that last June the readme was changed and the old info on how to change the self-hosted API was deleted.

What's the updated way to change the URL to point to a self-hosted installation?
Is it simply changing this URL here?
b0b7f2afdf/src/Core/Services/ApiService.cs (L69)

Thanks

Originally created by @pdarcos on GitHub (Dec 4, 2019). Original GitHub issue: https://github.com/bitwarden/android/issues/664 Hi, I noticed that last June the readme was changed and the old info on how to change the self-hosted API was deleted. What's the updated way to change the URL to point to a self-hosted installation? Is it simply changing this URL here? https://github.com/bitwarden/mobile/blob/b0b7f2afdf32738a321910ca9b76a4c29de007bb/src/Core/Services/ApiService.cs#L69 Thanks
Author
Owner

@kspearrin commented on GitHub (Dec 4, 2019):

You can do it in the app itself. Just tap the settings icon on the home screen.

<!-- gh-comment-id:561608353 --> @kspearrin commented on GitHub (Dec 4, 2019): You can do it in the app itself. Just tap the settings icon on the home screen.
Author
Owner

@pdarcos commented on GitHub (Dec 4, 2019):

Hi @kspearrin

Thanks for the quick response!
I'm aware of that and when I enter my server URL there under "self hosted environment" it works as expected.

But I want to change that programatically like I did in the past where I changed the Base URL in 6d11921f45/src/App/Utilities/ApiHttpClient.cs (L40)

The ApiHttpClient.cs file no longer exists so I assumed it had changed to the Apiservice.cs file I linked above.

However when I change the ApiBaseUrl I get a generic "an error has occurred" message so I'm assuming it needs to be changed somewhere else too, no?

Cheers

<!-- gh-comment-id:561610579 --> @pdarcos commented on GitHub (Dec 4, 2019): Hi @kspearrin Thanks for the quick response! I'm aware of that and when I enter my server URL there under "self hosted environment" it works as expected. But I want to change that programatically like I did in the past where I changed the Base URL in https://github.com/bitwarden/mobile/blob/6d11921f45ca210b31387e49f41d30c05fe4978c/src/App/Utilities/ApiHttpClient.cs#L40 The ApiHttpClient.cs file no longer exists so I assumed it had changed to the Apiservice.cs file I linked above. However when I change the ApiBaseUrl I get a generic "an error has occurred" message so I'm assuming it needs to be changed somewhere else too, no? Cheers
Author
Owner

@kspearrin commented on GitHub (Dec 4, 2019):

You can change it in the code under apiservice.cs in the core project.

<!-- gh-comment-id:561610987 --> @kspearrin commented on GitHub (Dec 4, 2019): You can change it in the code under apiservice.cs in the core project.
Author
Owner

@pdarcos commented on GitHub (Dec 4, 2019):

Yeah, that's what I tried already (see first post above) but I get the generic "an error has occurred" message without much more info even when running in debug mode.

I was hoping you knew off the top of your head some other setting that needs to be changed. I will try to drill down in the code and see if I can figure out why changing it inside the app works fine, but when I change it here it doesn't b0b7f2afdf/src/Core/Services/ApiService.cs (L69)

<!-- gh-comment-id:561620812 --> @pdarcos commented on GitHub (Dec 4, 2019): Yeah, that's what I tried already (see first post above) but I get the generic "an error has occurred" message without much more info even when running in debug mode. I was hoping you knew off the top of your head some other setting that needs to be changed. I will try to drill down in the code and see if I can figure out why changing it inside the app works fine, but when I change it here it doesn't https://github.com/bitwarden/mobile/blob/b0b7f2afdf32738a321910ca9b76a4c29de007bb/src/Core/Services/ApiService.cs#L69
Author
Owner

@pdarcos commented on GitHub (Dec 4, 2019):

Ignore my last comment. It is working now that the correct URI with full path is being used.

Thanks!

<!-- gh-comment-id:561634518 --> @pdarcos commented on GitHub (Dec 4, 2019): Ignore my last comment. It is working now that the correct URI with full path is being used. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#26766