Register Signed Key
cURL
curl --request POST \
--url https://api.neynar.com/v2/farcaster/signer/signed_key/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: NEYNAR_API_DOCS' \
--data '
{
"app_fid": 3,
"deadline": 123,
"signature": "<string>",
"signer_uuid": "19d0c5fd-9b33-4a48-a0e2-bc7b0555baec",
"redirect_url": "<string>",
"sponsor": {
"fid": 3,
"signature": "<string>",
"sponsored_by_neynar": true
}
}
'
import requests
url = "https://api.neynar.com/v2/farcaster/signer/signed_key/"
payload = {
"app_fid": 3,
"deadline": 123,
"signature": "<string>",
"signer_uuid": "19d0c5fd-9b33-4a48-a0e2-bc7b0555baec",
"redirect_url": "<string>",
"sponsor": {
"fid": 3,
"signature": "<string>",
"sponsored_by_neynar": True
}
}
headers = {
"x-api-key": "NEYNAR_API_DOCS",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': 'NEYNAR_API_DOCS', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_fid: 3,
deadline: 123,
signature: '<string>',
signer_uuid: '19d0c5fd-9b33-4a48-a0e2-bc7b0555baec',
redirect_url: '<string>',
sponsor: {fid: 3, signature: '<string>', sponsored_by_neynar: true}
})
};
fetch('https://api.neynar.com/v2/farcaster/signer/signed_key/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neynar.com/v2/farcaster/signer/signed_key/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'app_fid' => 3,
'deadline' => 123,
'signature' => '<string>',
'signer_uuid' => '19d0c5fd-9b33-4a48-a0e2-bc7b0555baec',
'redirect_url' => '<string>',
'sponsor' => [
'fid' => 3,
'signature' => '<string>',
'sponsored_by_neynar' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: NEYNAR_API_DOCS"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Responses
Success (200)
{
"public_key": "0x3daa8f99c5f760688a3c9f95716ed93dee5ed5d7722d776b7c4deac957755f22",
"signer_uuid": "19d0c5fd-9b33-4a48-a0e2-bc7b0555baec",
"fid": 3,
"object": "signer",
"permissions": [],
"signer_approval_url": "<string>"
}
Error Responses
400 Bad Request
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
403 Forbidden
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
404 Not Found
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
500 Internal Server Error
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
Parameters
Request Body
app_fid (integer): The unique identifier of a farcaster user or app (unsigned integer) - Required
deadline (integer): unix timestamp in seconds controlling how long the signed key request is valid for - Required
signature (string): Signature generated by the custody address of the app - Required
signer_uuid (string): UUID of the signer - Required
redirect_url (string): URL to redirect after approval - Optional
sponsor (object): Details about the sponsor
Response Body
public_key (string): Ed25519 public key - Required
signer_uuid (string): UUID of the signer - Required
status (enum): Current status of the signer - Required
fid (integer): Unique identifier - Required
object (string): Type of object - Required
permissions (array): List of permissions granted - Optional
signer_approval_url (string): URL for approval - Optional
Related Topics