• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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