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 Cloudron API Key

    Feature Requests
    api
    4
    5
    433
    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.
    • andres.moya
      andres.moya last edited by girish

      To use the Cloudron API, currently you must give a token that is obtained vi a call to the login endpoint.

      This means that, if you want to make a script that calls this API in an automatic way, you must store somewhere the actual password of a real Cloudron user in plain text.

      I wish it were possible to create an application API Key from some place in the cloudron panel, and use it to authenticate calls, as it's done in many other similar APIs.

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels App Dev @andres.moya last edited by fbartels

        Hi @andres-moya,
        if you go to https://my.your.domain/#/profile on your cloudron then you can create a token from there.

        andres.moya 1 Reply Last reply Reply Quote 2
        • andres.moya
          andres.moya @fbartels last edited by andres.moya

          @fbartels 😮 it's true! didn't see it 😅

          Perhaps it will be good to mention it in the API docs:
          https://docs.cloudron.io/api.html#tag/Cloudron

          Thanks very much for the help, anyway...

          BrutalBirdie 1 Reply Last reply Reply Quote 0
          • BrutalBirdie
            BrutalBirdie Staff @andres.moya last edited by

            @andres-moya The api doc is also kinda outdated 😕

            For example I wanted to Update some apps via API.
            Nothing mentioned about that in the API doc.
            But if you can read code, you can find the functions.

            https://git.cloudron.io/cloudron/cloudron-cli/-/blob/master/src/actions.js#L750

             url = `https://${adminFqdn}/api/v1/apps/${app.id}/update?access_token=${token}`;
            

            By the way @staff is it possible as a community contributor to update the API Doc with a PR?

            Like my work? Consider donating a beer 🍻 Cheers!

            1 Reply Last reply Reply Quote 1
            • girish
              girish Staff last edited by

              I have added it to https://docs.cloudron.io/profile/#api-tokens for a start. The API page is a bit outdated and will take more time to freshen up.

              1 Reply Last reply Reply Quote 2
              • First post
                Last post
              Powered by NodeBB