coddingtonbear / obsidian-local-rest-api

Unlock your automation needs by interacting with your notes in Obsidian over a secure REST API.
MIT License
644 stars 59 forks source link

i cannot seem to connect from another device within the same network to the api #49

Closed HighLibrarian closed 1 year ago

HighLibrarian commented 1 year ago

Hi there, first, thank you for this great plugin, this plugin creates so many new ways to interface with obsidian! but I seem to have an issue connecting to the api from another device from within the same network. I tried the following in PowerShell to get the status from the api but i cannot connect to the api using http (for testing purposes)

So obsidian runs on Device-A with windows firewall disabled (just t rule it out) and the http server is enabled using the default 27231 port. When I try to connect to it from Device-B i get "unable to connect to the remote server" from PowerShell. The following commands were used:

$headers = @{Authorization = "Bearer abcdef1234567890"}
Invoke-RestMethod -Method Get -Uri "http://192.168.20.15:27123/" -Headers $headers

locally on Device-A the command works fine and returns the versions and auth status.

Invoke-RestMethod -Method Get -Uri "http://127.0.0.1:27123/" -Headers $headers

Do you have an idea what the issue might be?

HighLibrarian commented 1 year ago

nevermind: found this discussion after posting: https://github.com/coddingtonbear/obsidian-local-rest-api/discussions/18)

coddingtonbear commented 1 year ago

Glad you found the answer, even if it was not the one you were hoping to hear. Good luck!