### Go example Source: https://docs.endaoment.org/developers/api/grant-transfers/list-fund-grants Go example using net/http to GET fund grants. Replace {id} and as needed. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/transfers/grants/fund/{id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Ruby example Source: https://docs.endaoment.org/developers/api/grant-transfers/list-fund-grants Ruby example using Net::HTTP to GET fund grants. Replace {id} and as needed. ```ruby require 'uri' require 'net/http' url = URI("https://api.dev.endaoment.org/v1/transfers/grants/fund/{id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` -------------------------------- ### Python requests example Source: https://docs.endaoment.org/developers/api/grant-transfers/list-fund-grants Python example using the requests library to GET fund grants. Replace {id} and as needed. ```python import requests url = "https://api.dev.endaoment.org/v1/transfers/grants/fund/{id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) ``` -------------------------------- ### JavaScript fetch example Source: https://docs.endaoment.org/developers/api/grant-transfers/list-fund-grants JavaScript example using fetch to GET fund grants. Replace {id} and as needed. ```javascript const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.dev.endaoment.org/v1/transfers/grants/fund/{id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` -------------------------------- ### Go example for portfolio activity Source: https://docs.endaoment.org/developers/api/activity/list-portfolio-activity Uses net/http to GET the portfolio activity endpoint with an Authorization header. Prints the response body. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/activity/portfolio/{id}?count=10" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Get organization by EIN with Go Source: https://docs.endaoment.org/developers/api/nonprofit-organizations/get-organization-by-ein Go example using net/http to fetch organization by EIN. Replace {ein} with the actual EIN. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/orgs/ein/{ein}" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Java Unirest example Source: https://docs.endaoment.org/developers/api/grant-transfers/list-fund-grants Java example using Unirest to GET fund grants. Replace {id} and as needed. ```java HttpResponse response = Unirest.get("https://api.dev.endaoment.org/v1/transfers/grants/fund/{id}") .header("Authorization", "Bearer ") .asString(); ``` -------------------------------- ### Ruby example for portfolio activity Source: https://docs.endaoment.org/developers/api/activity/list-portfolio-activity Uses net/http to GET the portfolio activity endpoint with an Authorization header. Prints the response body. ```ruby require 'uri' require 'net/http' url = URI("https://api.dev.endaoment.org/v1/activity/portfolio/{id}?count=10") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` -------------------------------- ### Python requests example for async entity transfer Source: https://docs.endaoment.org/developers/api/grant-transfers/create-async-entity-transfer Python example using the requests library to POST the same payload to the endpoint. Demonstrates setting headers and printing the response body. Requires the requests library to be installed. ```python import requests url = "https://api.dev.endaoment.org/v1/transfers/async-entity-transfers" payload = { "idempotencyKey": "123e4567-e89b-12d3-a456-426614174000", "requestedAmount": "1000000", "originFundId": "123e4567-e89b-12d3-a456-426614174000", "originOrgId": "123e4567-e89b-12d3-a456-426614174000", "destinationFundId": "123e4567-e89b-12d3-a456-426614174000", "destinationOrgId": "123e4567-e89b-12d3-a456-426614174000", "chainId": 1, "shareMyEmail": False } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) ``` -------------------------------- ### Get recommendation by ID interactive examples (cURL, Python, JavaScript) Source: https://docs.endaoment.org/developers/api/collaboration/get-recommendation-by-id Interactive API request examples for Get recommendation by ID. The cURL, Python, and JavaScript snippets are provided for the same endpoint, using the same Authorization header. The request is a GET to /v1/recommendations/{id}. ```bash curl --request GET \ --url https://api.dev.endaoment.org/v1/recommendations/{id} \ --header 'Authorization: Bearer ' ``` ```python import requests url = "https://api.dev.endaoment.org/v1/recommendations/{id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) ``` ```javascript const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.dev.endaoment.org/v1/recommendations/{id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` -------------------------------- ### Go example for creating crypto pledge recommendation Source: https://docs.endaoment.org/developers/api/collaboration/create-crypto-pledge-recommendation Uses net/http to POST the payload and prints the response body. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/recommendations/pledge-crypto" payload := strings.NewReader("{\n \"tokenId\": 1,\n \"inputAmount\": \"1000000000000000000\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"donorName\": \"Anonymous Donor\",\n \"updateIdentity\": true,\n \"shareMyEmail\": false,\n \"collaboratingFundId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"donorIdentity\": {\n \"address\": {\n \"country\": \"USA\"\n }\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Go example for creating portfolio trade recommendation Source: https://docs.endaoment.org/developers/api/collaboration/create-portfolio-trade-recommendation Uses the net/http package to POST the trade recommendation payload. Requires a valid bearer token and the payload as a JSON string. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/recommendations/trade" payload := strings.NewReader("{\n \"issuerEntityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"portfolioId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amountUsdc\": \"100000000\",\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"slippageToleranceBps\": 50,\n \"isMax\": false,\n \"collaboratingFundId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Go net/http example for async entity transfer Source: https://docs.endaoment.org/developers/api/grant-transfers/create-async-entity-transfer Go example using the net/http package to send the POST request. Builds the JSON payload as a string, sets headers, and prints the response body. Assumes the standard library and uses underscores to ignore errors. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/transfers/async-entity-transfers" payload := strings.NewReader("{\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### PHP cURL example Source: https://docs.endaoment.org/developers/api/grant-transfers/list-fund-grants PHP example using cURL to GET fund grants. Replace {id} and as needed. ```php "https://api.dev.endaoment.org/v1/transfers/grants/fund/{id}", 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 " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` -------------------------------- ### Go HTTP example for batch-lookup Source: https://docs.endaoment.org/developers/api/partner-endpoints/get-organizations-by-identifier Go example using the standard library to POST to the batch-lookup endpoint. Creates a request with the JSON payload and required headers, then reads and prints the response body. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/orgs/partner/batch-lookup" payload := strings.NewReader("{\ \"identifiers\": [\n \"530196605\",\n \"13-1624102\",\n \"550e8400-e29b-41d4-a716-446655440000\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Get authenticated caller - all language examples Source: https://docs.endaoment.org/developers/api/authentication/get-authenticated-caller Send a GET request to the whoami endpoint with the NdaoAuth cookie. The endpoint returns authenticated caller metadata. The cURL example uses the `--cookie` flag; other languages set the cookie header explicitly. ```bash curl --request GET \ --url https://api.dev.endaoment.org/v1/auth/whoami \ --cookie NdaoAuth= ``` ```python import requests url = "https://api.dev.endaoment.org/v1/auth/whoami" headers = {"cookie": "NdaoAuth="} response = requests.get(url, headers=headers) print(response.text) ``` ```javascript const options = {method: 'GET', headers: {cookie: 'NdaoAuth='}}; fetch('https://api.dev.endaoment.org/v1/auth/whoami', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); ``` ```php "https://api.dev.endaoment.org/v1/auth/whoami", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_COOKIE => "NdaoAuth=", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/auth/whoami" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("cookie", "NdaoAuth=") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```java HttpResponse response = Unirest.get("https://api.dev.endaoment.org/v1/auth/whoami") .header("cookie", "NdaoAuth=") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.dev.endaoment.org/v1/auth/whoami") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["cookie"] = 'NdaoAuth=' response = http.request(request) puts response.read_body ``` -------------------------------- ### Get organization by EIN with Ruby Source: https://docs.endaoment.org/developers/api/nonprofit-organizations/get-organization-by-ein Ruby Net::HTTP example to get organization by EIN. Replace {ein} with the actual EIN. ```ruby require 'uri' require 'net/http' url = URI("https://api.dev.endaoment.org/v1/orgs/ein/{ein}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` -------------------------------- ### 200 Response example Source: https://docs.endaoment.org/developers/api/donations/get-total-platform-impact Example response for a successful GET request. The response is a JSON string containing the total platform impact in USDC micro-units (1000000 = 1 USD). ```json "1234567890000" ``` -------------------------------- ### Go request for List fund recommendations Source: https://docs.endaoment.org/developers/api/collaboration/list-fund-recommendations Uses the net/http package to send a GET request. Prints the response body. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/recommendations/fund/{fundId}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Get organization by EIN with PHP cURL Source: https://docs.endaoment.org/developers/api/nonprofit-organizations/get-organization-by-ein PHP cURL example to get organization by EIN. Replace {ein} with the actual EIN. Outputs the response body or a cURL error. ```php "https://api.dev.endaoment.org/v1/orgs/ein/{ein}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` -------------------------------- ### List supported tokens with Go Source: https://docs.endaoment.org/developers/api/donations/list-supported-tokens Use the net/http package to perform a GET request to the tokens endpoint. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v2/tokens" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Response example for GET /v1/transfers/grants/total Source: https://docs.endaoment.org/developers/api/grant-transfers/get-total-granted-amount Example response body showing the total granted amount as a JSON string. The value is in USDC smallest currency unit (1000000 = 1 USD). ```json "1000000000" ``` -------------------------------- ### 200 response for GET recommendation by ID Source: https://docs.endaoment.org/developers/api/collaboration/get-recommendation-by-id Example 200 response from the GET /v1/recommendations/{id} endpoint. Contains the recommendation object with its collaboratorFund and collaborator details. Status options include Executed, Pending, and Dismissed. ```json 200 { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "collaboratorFund": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Doe Family Foundation", "type": "Private", "manager": { "id": "123e4567-e89b-12d3-a456-426614174000", "walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }, "chainId": 1, "advisor": { "firstName": "John", "lastName": "Doe" }, "featuredIndex": 1, "usdcBalance": "20500000", "availableBalance": "21000000", "description": "A family foundation dedicated to supporting educational initiatives", "createdAtUtc": "2024-01-01T00:00:00Z", "updatedAtUtc": "2024-03-14T12:00:00Z", "lifetimeDonationsUsdc": "1000000000", "inboundFeeBps": 25, "outboundFeeBps": 50, "grantsGiven": 10, "inTransitBuyUsdcAmount": "5000000", "inTransitSellUsdcAmount": "3000000", "investedUsdc": "50000000", "totalGrantedUsdc": "25000000", "processingTransfersTotalUsdc": "1000000", "illiquidBalance": "10000000", "deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567", "contractAddress": "0x1234567890123456789012345678901234567890", "lastBalanceSyncUtc": "2024-03-14T12:00:00Z", "shortDescription": "Supporting education", "vanityUrl": "doe-family-foundation", "paypalId": "123e4567-e89b-12d3-a456-426614174000", "logo": "https://example.com/logo.png", "category": "Education", "customFeeDetail": "Special Community Fund Agreement", "v2ContractAddress": "" }, "collaborator": { "id": "123e4567-e89b-12d3-a456-426614174000", "collaboratorUserId": "123e4567-e89b-12d3-a456-426614174000", "fundId": "123e4567-e89b-12d3-a456-426614174000", "createdAtUtc": "2026-02-11T14:32:10.123Z", "email": "john.doe@example.com", "firstName": "John", "lastName": "Doe" }, "createdAt": "2023-11-07T05:31:56Z", "status": "Executed", "type": "grant" } ``` -------------------------------- ### Create grant recommendation with Ruby Net::HTTP Source: https://docs.endaoment.org/developers/api/collaboration/create-grant-recommendation Ruby example using Net::HTTP to POST a grant recommendation. Requires the 'uri' and 'net/http' standard libraries. ```ruby require 'uri' require 'net/http' url = URI("https://api.dev.endaoment.org/v1/recommendations/grant") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"purpose\": \"General operating support\",\n \"amountUsdc\": \"100000000\",\n \"orgId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"offsetFee\": true,\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"recommender\": \"John Doe\",\n \"specialInstructions\": \"Funds must be used for the specific project X.\",\n \"subprojectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"shareMyEmail\": false,\n \"collaboratingFundId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}" response = http.request(request) puts response.read_body ``` -------------------------------- ### cURL: Start OAuth authorization Source: https://docs.endaoment.org/developers/api/authentication/start-oauth-authorization Sends a GET request to the OAuth authorization endpoint using cURL. ```bash curl --request GET \ --url https://auth.endaoment.org/auth ``` -------------------------------- ### Create Stock Donation Pledge with Go Source: https://docs.endaoment.org/developers/api/donations/create-stock-donation-pledge Use this Go example to create a stock donation pledge. It sends a POST request to the /v2/donation-pledges/stock endpoint with the same JSON payload as the PHP example, using the net/http package. The example sets the Authorization header with a bearer token and prints the response body. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v2/donation-pledges/stock" payload := strings.NewReader("{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"donorData\": {\n \"addressLine1\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"receiptEmail\": \"john.doe@example.com\",\n \"state\": \"CA\",\n \"zipcode\": \"94105\",\n \"addressLine2\": \"Apt 4B\"\n },\n \"brokerData\": {\n \"brokerContactName\": \"Jane Smith\",\n \"brokerEmail\": \"jane.smith@brokerage.com\",\n \"brokerName\": \"Fidelity\",\n \"brokerPhone\": \"+1 (555) 987-6543\",\n \"brokerageAccountNumber\": \"123456789\",\n \"customBrokerName\": \"Local Investment Partners LLC\"\n },\n \"signature\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingEntityType\": \"fund\",\n \"receivingEntityId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updateIdentity\": false,\n \"shareMyEmail\": false,\n \"recommendationId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"isRebalanceRequested\": false,\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Go request to list fund grants by ID Source: https://docs.endaoment.org/developers/api/partner-endpoints/list-fund-grants-by-id Go example using net/http to GET a fund grant by ID. Prints the response body. ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/transfers/grants/partner/fund/{id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Go: Create fund with net/http Source: https://docs.endaoment.org/developers/api/partner-endpoints/create-fund Uses the net/http package to POST the fund payload to /v1/funds/partner and prints the response body. ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dev.endaoment.org/v1/funds/partner" payload := strings.NewReader("{\n \"name\": \"Lovelace Family DAF\",\n \"partnerAccountIdentifier\": \"a7e21d94-5c3f-4b8a-9f60-2e4d8c1b7a53\",\n \"description\": \"A family DAF managed through a partner integration\",\n \"type\": \"Private\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### GET /auth Source: https://docs.endaoment.org/developers/api/authentication/start-oauth-authorization Starts the OAuth authorization flow. This endpoint redirects the user to the authorization page where they can grant access. ```APIDOC ## GET /auth ### Description Starts the OAuth authorization flow by redirecting the user to the authorization page. ### Method GET ### Endpoint https://auth.endaoment.org/auth ### Parameters None ### Request Example No request body required. ### Response #### Success Response (302) Redirects to the authorization page. #### Response Example No response body; the response is a redirect. ```