Skip to main content
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbase_fetchPermissions",
  "params": [{
    "spender": "0x2a83b0e4462449660b6e7567b2c81ac6d04d877d",
    "chainId": "0x14A34",
    "account": "0xfB2adc8629FC9F54e243377ffcECEb437a42934C"
  }]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "permissions": [
      {
        "createdAt": 1640995200,
        "permissionHash": "0xabc123...",
        "signature": "0xdef456...",
        "spendPermission": {
          "account": "0xfB2adc8629FC9F54e243377ffcECEb437a42934C",
          "spender": "0x2a83b0e4462449660b6e7567b2c81ac6d04d877d",
          "token": "0xA0b86a33E6441b97B7cd5C4F5B42a6e2F8a38923",
          "allowance": "1000000000000000000",
          "period": 86400,
          "start": 1640995200,
          "end": 1672531200,
          "salt": "12345678901234567890",
          "extraData": "0x"
        }
      }
    ],
    "pageDescription": {
      "pageSize": 1,
      "nextCursor": "abc123next"
    }
  }
}
Coinbase-specific RPC method
Retrieves permissions associated with a specific account and chain. If a spender is provided, returns only permissions for that spender. Otherwise, returns all permissions for the account. This method excludes permissions that have expired or been revoked, returning only active spend permissions. Sorted by creation date, oldest first.

Parameters

spender
string
required
The entity granted with the permission to spend funds. This is the address whose permissions are being queried.
chainId
string
required
The ID of the blockchain, in hexadecimal format.
account
string
Optional. The address of the account whose permissions are being queried. If not provided, returns all permissions for the spender.
pageOptions
object
Optional pagination settings for the request.

Returns

result
object
The permissions response object.
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbase_fetchPermissions",
  "params": [{
    "spender": "0x2a83b0e4462449660b6e7567b2c81ac6d04d877d",
    "chainId": "0x14A34",
    "account": "0xfB2adc8629FC9F54e243377ffcECEb437a42934C"
  }]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "permissions": [
      {
        "createdAt": 1640995200,
        "permissionHash": "0xabc123...",
        "signature": "0xdef456...",
        "spendPermission": {
          "account": "0xfB2adc8629FC9F54e243377ffcECEb437a42934C",
          "spender": "0x2a83b0e4462449660b6e7567b2c81ac6d04d877d",
          "token": "0xA0b86a33E6441b97B7cd5C4F5B42a6e2F8a38923",
          "allowance": "1000000000000000000",
          "period": 86400,
          "start": 1640995200,
          "end": 1672531200,
          "salt": "12345678901234567890",
          "extraData": "0x"
        }
      }
    ],
    "pageDescription": {
      "pageSize": 1,
      "nextCursor": "abc123next"
    }
  }
}

Error Handling

CodeMessageDescription
4001User rejected the requestUser denied the permission request
4100Requested method not supportedThe method is not supported by the wallet
-32602Invalid paramsInvalid account, chainId, or spender parameters
Ensure the chainId and spender parameters are correctly formatted and valid for the blockchain you are querying. If provided, the account parameter must also be a valid address.
I