---
title: getIdentity
description: >-
  Returns this RPC node's identity Pubkey.
url: /docs/rpc/http/getidentity
type: reference
hideTableOfContents: true
---

Returns this RPC node's identity Pubkey.

<Callout type="info" title="Source">
  [`get_identity`](https://github.com/anza-xyz/agave/blob/v3.1.8/rpc/src/rpc.rs#L2820)
</Callout>

<APIMethod>

```jsonc !!request curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIdentity"
}
```

```ts !!request title="Kit"
import { createSolanaRpc } from "@solana/kit";

const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);

let identity = await rpc.getIdentity().send();

console.log(identity);
```

```rs !!request title="Rust"
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;

#[tokio::main]
async fn main() -> Result<()> {
    let client = RpcClient::new_with_commitment(
        String::from("https://api.devnet.solana.com"),
        CommitmentConfig::confirmed(),
    );

    let identity = client.get_identity().await?;

    println!("{:#?}", identity);

    Ok(())
}
```

### !params

### !!result

```jsonc !response
{
  "jsonrpc": "2.0",
  // !hover(1:3) result
  "result": {
    // !hover identity
    "identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"
  },
  "id": 1
}
```

!type object

The result field will be a JSON object with the following fields:

##### !! identity

!type string

The identity pubkey of the current node (as a base-58 encoded string)

</APIMethod>
