Skip to main content
GET
/
v2
/
embedded-wallet-api
/
end-users
/
{userId}
/
delegation
Get delegation for end user
curl --request GET \
  --url https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation', 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://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cdp.coinbase.com/platform/v2/embedded-wallet-api/end-users/{userId}/delegation")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "expiresAt": "2026-02-03T10:35:00Z"
}
{
"errorType": "unauthorized",
"errorMessage": "The request is not properly authenticated."
}
{
"errorType": "not_found",
"errorMessage": "No active delegation found for the specified end user.",
"errorParam": "userId",
"errorLink": "https://docs.cdp.coinbase.com/api-reference/v2/errors#not-found"
}
{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}
{
"errorType": "bad_gateway",
"errorMessage": "Bad gateway. Please try again later."
}
{
"errorType": "service_unavailable",
"errorMessage": "Service unavailable. Please try again later."
}

Authorizations

Authorization
string
header
required

A JWT signed using the developer's own JWT private key (in the case of JWT authentication), or an end user JWT signed by CDP, encoded in base64. This is used for End User Account APIs.

Path Parameters

userId
string
required

The ID of the end user.

Pattern: ^[a-zA-Z0-9-]{1,100}$
Example:

"e051beeb-7163-4527-a5b6-35e301529ff2"

Query Parameters

projectID
string

The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Response

Active delegation found.

expiresAt
string<date-time>
required

The date until which the delegation is valid.

Example:

"2026-02-03T10:35:00Z"