My Problem
I just setup a VS Code server with the VS Code CLI tool via code tunnels. (https://code.visualstudio.com/docs/remote/tunnels)
Everything is working fine, the ports are getting forwarded to https://<someid>-<port>.<region>.devtunnels.ms/
so I can access my Application from anywhere. On default those websites are secured, so that you can only visit them when you are logged into GitHub.
However, one application needs to request another one, but it can't because it's not authenticated (via GitHub). So I don't know how to authenticate one application to access the devtunnels.ms website.
What I tried
I can access it from my browser (because I am authenticated). I tried to access on app from the other and its not working (I expected it to work, but I understand now why it doesn't work).
How can I allow my application to access my devtunnels.ms
websites?
You can get information from this Medium article that I wrote in the section "Access for web API clients". You need to install the devtunnel CLI and get a token for your tunnel.
$ curl -sL https://aka.ms/DevTunnelCliInstall | bash
$ source ~/.bashrc
$ devtunnel user login -d -g # device login with github
$ devtunnel list # get tunnels list
$ devtunnel token <tunnel-id> --scopes connect # create token
Next you should use header X-Tunnel-Authorization: tunnel <TOKEN>
.