Skip to main content
Change User Pin
curl --request POST \
  --url https://testnet.walletkit.com/wallets/change-user-pin \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "network": "Polygon",
  "address": "0x976Cf57B7EE1D84E73BE9115457889d49a8A1335",
  "old_user_pin": "123456",
  "new_user_pin": "654321"
}
'
import requests

url = "https://testnet.walletkit.com/wallets/change-user-pin"

payload = {
"network": "Polygon",
"address": "0x976Cf57B7EE1D84E73BE9115457889d49a8A1335",
"old_user_pin": "123456",
"new_user_pin": "654321"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network: 'Polygon',
address: '0x976Cf57B7EE1D84E73BE9115457889d49a8A1335',
old_user_pin: '123456',
new_user_pin: '654321'
})
};

fetch('https://testnet.walletkit.com/wallets/change-user-pin', 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://testnet.walletkit.com/wallets/change-user-pin",
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([
'network' => 'Polygon',
'address' => '0x976Cf57B7EE1D84E73BE9115457889d49a8A1335',
'old_user_pin' => '123456',
'new_user_pin' => '654321'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://testnet.walletkit.com/wallets/change-user-pin"

payload := strings.NewReader("{\n \"network\": \"Polygon\",\n \"address\": \"0x976Cf57B7EE1D84E73BE9115457889d49a8A1335\",\n \"old_user_pin\": \"123456\",\n \"new_user_pin\": \"654321\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://testnet.walletkit.com/wallets/change-user-pin")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"Polygon\",\n \"address\": \"0x976Cf57B7EE1D84E73BE9115457889d49a8A1335\",\n \"old_user_pin\": \"123456\",\n \"new_user_pin\": \"654321\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://testnet.walletkit.com/wallets/change-user-pin")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"Polygon\",\n \"address\": \"0x976Cf57B7EE1D84E73BE9115457889d49a8A1335\",\n \"old_user_pin\": \"123456\",\n \"new_user_pin\": \"654321\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}

Headers

X-WalletKit-Project-ID
string
required
Your WalletKit Project ID can be found on the API Keys page in the WalletKit Dashboard.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
network
enum<string>
required
Available options:
Ethereum,
Polygon,
Base,
Avalanche,
Polkadot,
Vara
address
string
required
Example:

"0x976Cf57B7EE1D84E73BE9115457889d49a8A1335"

old_user_pin
string | null
required

A 6-digit numeric pin that is only known to the user, set during wallet creation. This pin is required to sign transactions from this wallet.

new_user_pin
string | null
required

A 6-digit numeric pin that is only known to the user, set during wallet creation. This pin is required to sign transactions from this wallet.

Response

success
boolean
required
Example:

true