How to change master key for a moralis v1 server

How can I change my master key for my V1 server?

There was a way to regenerate secrets. I donโ€™t remember if it was also changing the master key. There should be code example on a forum post about how to generate the secrets programmatically, I didnโ€™t find it now on a sinple search.

You can use this Python code to regenerate the secrets programmatically:

import requests
url = "https://admin.moralis.io/api/privates/server/regenerateSecrets"
payload = {"parameters":{"serverId":999999},"token":"auth_token_from_admin_interface","g-recaptcha-response":""}

headers = {
    "Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())

You have to identify the server id from admin interface and get the auth token that is a JWT token used in admin interface for requests.

Thank you, Iโ€™ll try this.

2 Likes

Hey @CaptainMango,

Iโ€™m reaching out to ask whether you have this problem solved?

Let us know if you face any other error, we would be happy to help out :grinning_face_with_smiling_eyes:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.