-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API access from LAN network #37
Comments
Hi, You need to reserve the URL with netsh for it to work outside of localhost (or you can run the MT engine as admin, but that's never a good idea). Here's the command to use (this needs to be executed in a command prompt with admin rights):
Substitute domain or computer name for DOMAIN and your user name for username. There may be some firewall configuration required in addition to that (but I think it might be handled by a prompt when you start the MT engine after running netsh). |
Indeed. Thanks that worked ! Now I am facing little bit different issue. When calling MTRestService/ListSupportedLanguagePairs , I am getting following response ` <TITLE>Bad Request</TITLE>Bad Request - Invalid URLHTTP Error 400. The request URL is invalid. `Am I doing something wrong ? |
Hi, Looks like you need to specify the tokenCode parameter in the request. The tokenCode is not actually used, it's just a leftover from the API code that I used as the basis of the OPUS-CAT API, but it's still required. I've fixed this in the code, so in future versions the tokenCode should not be required, but for now, you can include tokenCode=0 or some other tokenCode value in the request. I should probably rework the API, currently even the name is misleading, since it's not an actual REST API (I'll keep it backwards compatible, though). -Tommi |
Yes, it works now ! Once again thank you :) |
Greetings all,
We are trying to access REST API from LAN network, but seems somehow access is restricted only to localhost requests. is there a way how to configure it ?
2022-05-26 09:58:11.479 +02:00 [INF] Started HTTP API at http:https://localhost:8500. This API cannot be accessed from remote computers.
Thanks for help in advance
Regards
Martin
The text was updated successfully, but these errors were encountered: