**Step 1:** To access XRP, use one of the following native access endpoints:

- **Network:** Mainnet
- **Request Type:** POST

```undefined
https://svc.blockdaemon.com/xrp/mainnet/native
```

- **Network**: Testnet
- **Request Type:** POST

```undefined
https://svc.blockdaemon.com/xrp/testnet/native
```

The request format is the same for Mainnet and Testnet. Use Testnet-specific transaction hashes, account addresses, and other network data when making Testnet requests.

**Step 2:** Authenticate your request using your API key. You can include the API key using either of the following headers:

Bearer Token

```curl
Authorization: Bearer YOUR_API_KEY
```

X-API-Key

```curl
X-API-Key: YOUR_API_KEY
```

**Step 3:** Specify an XRP method in the request body:

> Learn more about XRP RPC methods [here](https://docs.blockdaemon.com/reference/xrp-methods-rpc-api).

JSON

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "YOUR_METHOD",
    "params": []
}
```

## Example Request

Here is a cURL example for using **[ledger_current](https://xrpl.org/ledger_current.html)** to get the unique identifier of the current in-progress ledger in XRP Mainnet:

cURL

```curl
curl -X POST \
https://svc.blockdaemon.com/xrp/mainnet/native \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0", "id": 1, "method": "ledger_current", "params": []}'
```

The following is a typical response you will get:

JSON

```json
{
    "result": {
        "ledger_current_index": 73876024,
        "status": "success"
    }
}
```
