Summary
Sending a GET request to the API results in “We’re having trouble connecting to Mattermost” error response.
Steps to reproduce
From the commandline issue following command (taken from the API Doc):
curl -i -H "Authorization: Bearer authtokenhere1234" https://my.mattermost.instance:8065/vci/api/v4/users/me
Expected behavior
Getting a application/json response similar as described in the API Doc
Observed behavior
HTML Response consisting of a page telling me: “Cannot connect to Mattermost. We’re having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.”
I’ve checked similar posts on the forum, I’ve tried to remove the port information, resulting in
curl -i -H "Authorization: Bearer authtokenhere1234" https://my.mattermost.instance/vci/api/v4/users/me
However I will then get a Error 301 page telling me, that the document has been moved to https://my.mattermost.instance:8065/vci/api/v4/users/me
Could this be traced back to a setup mistake of the server, or do I have to enable the API first somehow (I’ve tried searching for that on the web, without success)?
Edit: The server itself works fine, alot of users are actively using this instance for daily work and there are no issues besides the API not responding as expected.
Any ideas are appreciated.
Edit 2: I’ve realized that I’ve been using the wrong URL all the time…