API - "You do not own that domain"

Hi everyone - been using MXRoute for a little while and now looking to automate some of the functions in it (create emails etc).

Had a look at the DA API and can use my username and password to get a list of the domains I have in my account with the /CMD_API_SHOW_DOMAINS command. That works fine.

However, when I try to create an email in one of those domains, I get the “You do not own that domain error”

To test the API I was running:

curl -ks -u my_username:my_password https://xxxxxx.mxrouting.net:2222/CMD_API_POP?action=create&domain=mydomain.com&user=emailusername&passwd=Thisismypassword23&quota=10

Any ideas where I am going wrong?
Thanks for your time!

Are you certain that you haven’t mixed up the accounts and that the domain being used there is indeed owned by the account in question? If it comes down to it it’ll be a bug report to DirectAdmin but since I don’t know how much effort you’ve put into troubleshooting on your side prior, user error should be the first thing to check off before going there.

I am still messing about to make sure its not my fat finger mess up so please don’t go to any effort yet, just wondered if anyone else had the same thing that was all.

Was strange that I can list the domains fine (so its in there) but can’t create an email address. Trying to read through the DA docs but wow, not the easiest thing to do!

Just to check though - the account name I log into DA with is the username for all the domains in the account right?

@minty I have the same problem. Did you find out what causes this problem?

I didn’t unfortunately so put it on the “look at later” list for now. Now you have reminded me I will try to have another crack this week.

Would be better to take this to support@mxroute.com and give me all of the necessary information to replicate your scenario. Please make sure that you are running the command directly as the user which owns the domain, or using a key that has proper permissions, and not as a reseller executing on behalf of a user, etc. I haven’t been able to find any reports of similar behavior for reasons that were not user error or old template issues long since fixed (and also not relevant to direct API), so I’ll be a hard skeptic until I can verify otherwise.

@Jarland Hi, any chance that you can look into this? Even with a freshly created domain (through the api) i cannot create a email inbox because it returns the error ‘You do not own that domain’. The credentials used are the same for both api calls. If i look into the domain configuration it lists me as the assigned user too. I checked the web interface for the proper usage too and didnt find any obvious mistakes in the api usage.