curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "signMessage",
"params": {
"message": "aGVsbG8sIFByaXZ5IQ=",
"encoding": "base64"
}
}
'
{
"method": "signMessage",
"data": {
"signature": "76wpEsq9FS4QOInePQUY3b4GCXdVwLv+nNp4NnI+EPTAPVwvXCjzjUW/gD6Vuh4KaD+7p2X4MaTu6xYu0rMTAA==",
"encoding": "base64"
}
}
Solana
signMessage
Sign a message with a Solana wallet using the signMessage method.
POST
/
v1
/
wallets
/
{wallet_id}
/
rpc
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "signMessage",
"params": {
"message": "aGVsbG8sIFByaXZ5IQ=",
"encoding": "base64"
}
}
'
{
"method": "signMessage",
"data": {
"signature": "76wpEsq9FS4QOInePQUY3b4GCXdVwLv+nNp4NnI+EPTAPVwvXCjzjUW/gD6Vuh4KaD+7p2X4MaTu6xYu0rMTAA==",
"encoding": "base64"
}
}
SDK methods
Learn more about signing messages using our SDKs here.Idempotency on errors: On 4xx or 5xx, Privy caches the response and replays it for the same
key. Generate a new key to retry after a server error. Policy violations are an exception and
allow same-key retries.
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "signMessage",
"params": {
"message": "aGVsbG8sIFByaXZ5IQ=",
"encoding": "base64"
}
}
'
{
"method": "signMessage",
"data": {
"signature": "76wpEsq9FS4QOInePQUY3b4GCXdVwLv+nNp4NnI+EPTAPVwvXCjzjUW/gD6Vuh4KaD+7p2X4MaTu6xYu0rMTAA==",
"encoding": "base64"
}
}
Headers
string
required
ID of your Privy app.
string
Request authorization signature. If multiple signatures are required, they should be comma
separated.
string
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
request must be processed.
Path Parameters
string
required
ID of the wallet to get.
Body
string
required
Available options:
signMessageobject
required
Response
enum<string>
required
Available options:
signMessageWas this page helpful?

