Hah! The tool I used to allow my users to change their mailbox passwords after migration from WF was crashing the other day. I tracked down the changes and fixed my code.

The people at Opalstack are really helpful and crazy fast at responding to issues raised both here or through tickets. It would be helpful though if we had some mailing list or RSS feed to keep updated with both changes and new stuff at Opalstack (maybe I don't know about it...). It would a lot of time for both chasing and error introduced by a changes like this and to the good people at Opalstack who answer our questions.

    gelu We're not officially publishing changes to the API because the API itself has not been officially released.

    Once we've finalized the API and have fully documented everything, then we'll start managing changes publicly.

    • gelu replied to this.

      sean That's reasonable. What I was suggesting was not necessarily related to the API itself, but rather about building a channel of communication so that we know what's coming and when. This would be for the actual Opalstack users and would preferably lean on the technical side. I can read the blog about new and exiting stuff and I can check the boards for solutions. This channel would serve an entirely different purpose, if it makes sense to you, of course.

      • sean replied to this.
        18 days later

        API working great -- going to save my skin doing 100's of email account migrations -- thanks!

        Having trouble with api/v0/mailuser/pwdch/ --> 400 Bad Request {"error": "INVALID"}
        Here's my code:

            r = requests.post(
                'https://my.opalstack.com/api/v0/mailuser/pwdch/',
                auth=TokenAuth(TOKEN),
                json={
                     'id': 'd035b2b7-c55b-413b-a5f1-4edbe7ea5de0', 
                     'password': 'some password'
                   },
           )
          print (r.status_code, r.reason, r.text)
          > 400 Bad Request {"error": "INVALID"}

        No problem with other requests.
        I have tried all combinations of data= vs. json= and json.dumps() vs. normal dict
        Any ideas what I'm doing dumb here appreciated.

        • sean replied to this.

          dcd pwdch takes a list, try this:

              r = requests.post(
                  'https://my.opalstack.com/api/v0/mailuser/pwdch/',
                  auth=TokenAuth(TOKEN),
                  json=[{
                       'id': 'd035b2b7-c55b-413b-a5f1-4edbe7ea5de0', 
                       'password': 'some password'
                     }],
             )
          • dcd replied to this.

            sean Damn. No Dice Sean. Here's a complete session with just a few details redacted, hopefully give a clue what dumb-ass thing I am doing...

            mailbox_id = 'd035b2b7-c55b-413b-a5f1-4edbe7ea5de0'
            ... r = requests.get(
            ...     'https://my.opalstack.com/api/v0/mailuser/read/{}'.format(mailbox_id),
            ...     auth = TokenAuth(TOKEN),
            ... )
            ... print(r, r.content)
            ... 
            <Response [200]> b'{"id": "d035b2b7-c55b-413b-a5f1-4edbe7ea5de0", "name": "<xxx>", "pending_deletion": false, "ready": true, "imap_server": "<uuid>", "init_created": true}'
            r = requests.post(
            ...     'https://my.opalstack.com/api/v0/mailuser/pwdch/',
            ...     auth=TokenAuth(TOKEN),
            ...     json=[{
            ...         'id'      : mailbox_id,
            ...         'password': 'some password'
            ...     }],
            ... )
            ... print(r, r.reason)
            ... 
            <Response [400]> Bad Request
            • dcd replied to this.

              dcd I think I got it. My passwords arer long and random, but did not contain any upper-case letter.
              Saw a tip on another thread to watch XHR requests while doing operations via control panel -- excellent tip, that gave me the answers I needed. Thanks Sean, sorry for the diversion.

              • dcd replied to this.

                dcd Proof in the pudding:

                ... r = requests.post(
                ...     'https://my.opalstack.com/api/v0/mailuser/pwdch/',
                ...     auth=TokenAuth(TOKEN),
                ...     json=[{
                ...         'id'      : mailbox_id,
                ...         'password': 's0me P@ssword'
                ...     }],
                ... )
                ... print(r, r.reason)
                ... 
                <Response [200]> OK
                7 months later
                a month later

                Any chance you can add to the docs where lists are required? Got caught with DNSRecord/Update failing in my ddns script due to not passing a list. I know you have mentioned that lists are now required at a number of end points, would be great if those can be called out in the V1 docs. Thanks!

                • sean replied to this.

                  allyn I believe all create endpoints require lists now.

                  Mastodon