NEAR Protocol RPC: View Access Key (1.0.0)

Query details of a specific access key for a NEAR account

Download OpenAPI description
Languages
Servers
Mainnet
https://rpc.mainnet.fastnear.com/
Testnet
https://rpc.testnet.fastnear.com/

View account access key

Request

Retrieves information about a specific access key for a NEAR account

Bodyapplication/jsonrequired
jsonrpcstringrequired
Value"2.0"
idstringrequired
Example: "fastnear"
methodstringrequired
Value"query"
paramsobjectrequired
params.​request_typestringrequired
Value"view_access_key"
params.​account_idstringrequired

NEAR account ID

params.​public_keystringrequired

ed25519: or secp256k1: prefixed public key

params.​finalitystringrequired

Block finality

Enum"final""optimistic"
curl -i -X POST \
  https://rpc.mainnet.fastnear.com/ \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": "fastnear",
    "method": "query",
    "params": {
      "request_type": "view_access_key",
      "finality": "final",
      "account_id": "mike.near",
      "public_key": "ed25519:6666666666666666666666666666666666666666666"
    }
  }'

Responses

Successful response

Bodyapplication/json
jsonrpcstringrequired
Value"2.0"
idstring or numberrequired
One of:
string
resultobject

Describes access key permission scope and nonce.

errorobject
Response
application/json
{ "jsonrpc": "2.0", "id": "string", "result": { "nonce": 0, "permission": "FullAccess" }, "error": { "code": 0, "message": "string", "data": {} } }