Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved API not working

    LanguageTool
    3
    5
    79
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      privsec last edited by privsec

      Hello,

      I am not sure what I am doing wrong.

      I have tried the following

      languagetool.domain.com/secret and languagetool.domain.com/api/secret

      The https://languagetool.domain.com/secret gives me the error
      Sorry, something went wrong while checking your text. Restarting your browser might solve this. (400)

      The languagetool.domain.com/api/secret gives me
      Cannot connect to https://languagetool.domain.com/api/secret/check - please check your internet connection or try again in a minute (#1, code=0)

      necrevistonnezr 1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Not sure how you came up with those api paths. But does /v2/languages work for you?

        1 Reply Last reply Reply Quote 0
        • necrevistonnezr
          necrevistonnezr @privsec last edited by

          @privsec I think the documentation has changed slightly by now: https://docs.cloudron.io/apps/languagetool/

          The API seems to be https://languagetool.domain.com/secret/v2 (note the "v2"!)
          Also, I don't know how many characters the "secret" can have - the documentation suggests 6 characters(?)
          Also note from the docs:

          The secret is part of the URL. For this reason, keep it simple and use only alphanumerals for the secret.

          necrevistonnezr 1 Reply Last reply Reply Quote 0
          • necrevistonnezr
            necrevistonnezr @necrevistonnezr last edited by

            This works for me now (censored data):

            My env file

            # magic/hidden URL
            # API_PATH_PREFIX=MakeAPIHidden
            # Activate n-gram dataset(s) if necessary
            # https://languagetool.org/download/ngram-data/
            NGRAM_DATASET=("en" "de")
            NGRAMS_DATASET_PATH=/media/Languagetool/
            API_PATH_PREFIX=x6ygnjHT
            

            My configuration in the LanguageTool Extension:

            Other Server: https://lt.mydomain.com/x6ygnjHT/v2
            
            P 1 Reply Last reply Reply Quote 0
            • P
              privsec @necrevistonnezr last edited by

              @necrevistonnezr Yup, that's now working for me as well
              Thanks @staff

              1 Reply Last reply Reply Quote 0
              • Topic has been marked as a question  nebulon nebulon 
              • Topic has been marked as solved  nebulon nebulon 
              • First post
                Last post
              Powered by NodeBB