v1

latestOpenAPI 3.0.42026-08-068161,1253.1 MB
Universes

Get Public Key

Retrieves the public key for a universe. You need this key to encrypt secret content before sending it to Roblox.

Only the owner of the universe can retrieve the public key. For group-owned universes, only the group owner or authorized members can retrieve the public key.

The secret id field is static and always returns "public-key".

The returned public key in the secret field is universe-specific and derived from a master key using the universe ID. Use this key with LibSodium sealed box encryption to encrypt your secret content before creating or updating secrets.

Include the key_id from the public key response in the request to create or update a secret.

get/cloud/v2/universes/{universeId}/secrets/public-key

Path parameters

universeIdinteger required

The universe ID

Response

OK

idstring nullable

The user-specified secret name. Examples: "aws", "gcp", "discord".

Static when getting the public key for a universe.

Must be alphanumeric or underscore, 1-64 characters, not starting with a number.

secretstring byte nullable

The binary secret content. Examples: API key content (text), private keys.

When created, the secret must be encrypted using LibSodium sealed box and encoded in base64 with the universe's public key.

Contains the public key when getting the public key for a universe.

key_idstring nullable

Encryption key identifier. Identifies the key that was used to encrypt the secret content.

domainstring nullable

The domain wildcard that restricts the purpose of the key.

You can restrict the URLs callable via HttpService to a specific domain, e.g. "api.example.com" or "*.myservice.org".

An empty or null domain means that the secret is a private key and cannot be transformed with addPrefix/addSuffix or sent as a header or URL.

In order to make the secret accessible for all domains, use "*"

create_timestring nullable

Date and time when the secret was originally created.

update_timestring nullable

Date and time when the secret was last updated