• 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.

Issue Plesk RESTful API not working since today

Gianni

New Pleskian
Server operating system version
Debian 10.11
Plesk version and microupdate number
Versione 18.0.62
Hi everyone I have not found a solution to the 401 problem.

As of today any KEY will not allow me to communicate with plesk by returning an error

401 Undocumented Error: response status is 401

I know about the change in version 18.0.62, my curl header has always been

$headers[] = "Content-Type: application/json";

What could have happened to the plesk?

Thanks for the help
 
Which API does each REST API endpoint return a 401 for you? Or only specific endpoint? If so, what's the full cURL call being made?
 
Which API does each REST API endpoint return a 401 for you? Or only specific endpoint? If so, what's the full cURL call being made?
I couldn't quite figure out what happened, but I try to describe my activity on the server with the Plesk RESTful API:

In practice, with Plesk RESTful API I automatically create 'user + domain' on the plesk and it went perfectly on server No. 1

Today I encountered the problem and my curl script no longer created the domain but only the user

I did a switch on server no.2 to see if the curl script had any bugs but on server no.2 it worked perfectly so it is not a php curl script error

Then I copied the API-Key to test it directly on plesk in the Plesk RESTful API v2 page and that's where I discovered the 401 error on all entry points

Thinking that API-Key had expired (although I know it never expires) I regenerated more API-Key with the script anyway:

plesk bin secret_key -c -ip-address xxx.xx.xxx.xxx -description "token"
but even so I got a 401 error.

So I tried regenerating API-KEY with the following script:

plesk bin secret_key –c
In this case, the generated key worked perfectly on both curl and plesk page Remote Api

I don't understand what happened but after the 401 error and the KEY no longer working in my vhosts and System file was occupied by folders from domains I had created with Curl and then deleted from plesk.

To delete them from vhosts I had to recreate the deleted domains and then delete them again, and this solved the vhosts problem

But all this has created a problem for me on Service Plans and Subscriptions.
Now on Service Plans I have five domains that I had deleted, but in fact the domains no longer exist inside the Service Plans.

I have tried sending the Plesk repair command but have not solved it However apart from the Service Plans and Subscriptions which say they contain domains now with the regeneration of the KEY-API everything seems to work.
If there is a solution to empty the Service Plans and Subscriptions I thank you.

I apologise for my lengthy explanation
 
I am afraid I don't quite follow what the issue is you are having. Is the 401 error solved?
 
I am afraid I don't quite follow what the issue is you are having. Is the 401 error solved?

I apologize but this all happened to me today and I am not explaining it well.

Yes the 401 problem has been solved by generating other key as I explained before.

The problem is that now I am getting some false information like the presence of Subscriptions already deleted inside one of the service plans.

If you can help me understand how to reset the Service Plan I thank you.

I have already run plesk repair all and a corrected several errors but not the Service Plan.

thank you
 
I apologize but this all happened to me today and I am not explaining it well.

Yes the 401 problem has been solved by generating other key as I explained before.
Good to read you've managed to solve the issue with the API :)

The problem is that now I am getting some false information like the presence of Subscriptions already deleted inside one of the service plans.

If you can help me understand how to reset the Service Plan I thank you.

I have already run plesk repair all and a corrected several errors but not the Service Plan.
Unfortunately I don't completely understand what the problem exactly is that your having. Which makes it difficult for me to help you. Do you have additional details you can share? Or screenshot perhaps?
 
Good to read you've managed to solve the issue with the API :)


Unfortunately I don't completely understand what the problem exactly is that your having. Which makes it difficult for me to help you. Do you have additional details you can share? Or screenshot perhaps?
I thank you for your patience.

The problem arose with the API_Key which stopped working and I do not understand why since it should not expire.

After many nerve-wracking tests I had to regenerate the API KEY and now everything works, that is, I can create the user and domain again

all this caused me a problem on the domains which I partially solved but as per the screenshot I now find false data in the number of domains present in the service plans.

I don't know how it is possible to reset the service plans with the exact number of domains for each service plan.

Repair plesk All performed some checks but did not adjust the service plans.

I hope I explained myself, thanks
 

Attachments

  • plesk_plans.jpg
    plesk_plans.jpg
    703.8 KB · Views: 4
I get it now. Thank you for clarifying :)

This a strange issue. I am not sure how this can be solved. I recommend opening a ticket with our support team for an investigation of the issue. To sign-in to support and open a ticket go to https://support.plesk.com.

If you got your license from a reseller, your reseller should provide support for you. If the reseller does not provide support, here is an alternative to get support directly from Plesk: https://support.plesk.com/hc/en-us/articles/12388090147095-How-to-get-support-directly-from-Plesk
 
Thank you very much I will try to ask for assistance at the links you sent me just to see if it is my problem on the server.

I would like to ask you one more information I don't know if I can here or open another post.

the question is this:

is it possible to insert a custom button that is the same for all users within their account?
 

Attachments

  • custon.jpg
    custon.jpg
    266.3 KB · Views: 4
Unfortunately there currently is no option for custom buttons to be shown in the left side menu for all users.

However if you have a little bit of programming knowledge you could create a custom Plesk Extensions to accomplish this. More information can be found here:
 
Unfortunately there currently is no option for custom buttons to be shown in the left side menu for all users.

However if you have a little bit of programming knowledge you could create a custom Plesk Extensions to accomplish this. More information can be found here:
Thanks for the help
Hi
 
Back
Top