• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question API return 401, 403 error with reseller's api key

flexer88

New Pleskian
Server operating system version
Ubuntu 20.04.4 LTS
Plesk version and microupdate number
18.0.44
Hello,

I'm building an application for server automation. I don't want to use admin (root) credential to create api key (too risky), so, I created a reseller for that.

1. If I using reseller's credential, I can not create API key (got 403 error)

create-api-key-with-reseller-credential.png

2. If I using admin credential, I can create API key for a specific reseller, but when I used the API key, it always return 401 error

get-server-ifo.png

I need to use reseller's credential to create it's own api key, so I can use that API key to control everything inside its scope.

Thank you.

Notes:
- Everything fine If I used admin's credential to create admin's api key.
- My plesk's version: 18.0.44
- OS: Ubuntu 20.04.4 LTS
 
I believe that's by design as resellers don't have the privileges to use the API. Only root and the administrator users have privileges to use the API.
 
Last edited:
I believe that's be design as resellers don't have the privileges to use the API. Only root and the administrator users have privileges to use the API.
So I just wonder why I can create API key for reseller. Also, it's too risky for using root & admin's credential for external app.
 
Back
Top