Hi all,
I’m trying to update the HS256 signing secret for an API. This should be possible using the Resource Server resource via the Management API like so: Auth0 Management API v2
I can access correctly access the details of the API in question with the appropriate GET request. I can enumerate all the APIs, I got the management token manually via the dashboard and it appears to have the correct scopes for what I want to do: “read:resource_servers update:resource_servers delete:resource_servers create:resource_servers”
In my case call the PATCH method with a payload that contains the new signing secret.
My issue is that no matter the payload I try all I get is a 301 response that redirects to the GET request, so
this call PATCH http://.us.auth0.com/api/v2/resource-servers/ with a payload redirects to GET http://.us.auth0.com/api/v2/resource-servers/
Is the ability to update deprecated/not supported perhaps ?
Anyone able to update an API via the Management API ? the Management API Explorer also doesnt work for me for this particular call.
I have ran some tests on my end and found no issues with updating my API’s signing algorithm from RS256 to HS256.
In my tests, I used Postman to make a PATCH request to the Management API’s Update a resource server endpoint. In the response, I received a 200 response status code and when checking the Dashboard, the changes are reflected on there.
Here is the piece of code I used to update the API’s signing algorithm:
Hi Reuben,
I was able to get back to this and it seems to work now. The docs specify a 201 response, but I do get a 200 now.
For what its worth after reading your reply I did use the login.auth0.com hostname with my ‘:id’ which obviously error’d out and then I switched back to my tenant hostname and all seemed to be working.