JavaScript
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const accountView = await client.accounts.me();
console.log(accountView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
account_view = client.accounts.me()
print(account_view.id)curl --request GET \
--url https://api.runloop.ai/v1/accounts/me \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/accounts/me",
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.runloop.ai/v1/accounts/me"
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.runloop.ai/v1/accounts/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/accounts/me")
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{
"id": "<string>",
"name": "<string>",
"tier": "ACCOUNT_TIER_INVALID",
"account_status": "ACCOUNT_STATUS_INVALID",
"created_at": "<string>",
"billing": {
"account_billing_type": "STRIPE",
"stripe": {
"customer_id": "<string>",
"active_subscription": "<string>"
},
"aws": {
"customer_identifier": "<string>",
"license_arn": "<string>",
"subscription_status": "<string>"
},
"stripe_customer_id": "<string>"
},
"stripe_customer_id": "<string>",
"active_subscription": "<string>",
"account_billing_type": "STRIPE",
"external_billing_account_id": "<string>"
}accounts
Get the authenticated caller's account.
Returns the account the API key or session is authenticated against, including id, name, tier, and billing summary.
GET
/
v1
/
accounts
/
me
JavaScript
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const accountView = await client.accounts.me();
console.log(accountView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
account_view = client.accounts.me()
print(account_view.id)curl --request GET \
--url https://api.runloop.ai/v1/accounts/me \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/accounts/me",
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.runloop.ai/v1/accounts/me"
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.runloop.ai/v1/accounts/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/accounts/me")
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{
"id": "<string>",
"name": "<string>",
"tier": "ACCOUNT_TIER_INVALID",
"account_status": "ACCOUNT_STATUS_INVALID",
"created_at": "<string>",
"billing": {
"account_billing_type": "STRIPE",
"stripe": {
"customer_id": "<string>",
"active_subscription": "<string>"
},
"aws": {
"customer_identifier": "<string>",
"license_arn": "<string>",
"subscription_status": "<string>"
},
"stripe_customer_id": "<string>"
},
"stripe_customer_id": "<string>",
"active_subscription": "<string>",
"account_billing_type": "STRIPE",
"external_billing_account_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
OK
Account information.
The account ID.
The account name.
The account tier.
Available options:
ACCOUNT_TIER_INVALID, ACCOUNT_TIER_BASIC, ACCOUNT_TIER_PRO, ACCOUNT_TIER_ENTERPRISE, ACCOUNT_TIER_TRIAL, UNRECOGNIZED The account status.
Available options:
ACCOUNT_STATUS_INVALID, ACCOUNT_STATUS_ONBOARDING, ACCOUNT_STATUS_ENABLED, ACCOUNT_STATUS_DISABLED_BY_ADMIN, ACCOUNT_STATUS_DISABLED_QUOTA_REACHED, ACCOUNT_STATUS_TRIAL_CANCELLED, ACCOUNT_STATUS_STRIPE_PENDING_RESOURCES, UNRECOGNIZED The account creation timestamp.
The account billing information.
Show child attributes
Show child attributes
Deprecated: use billing.stripe.customer_id.
Deprecated: use billing.stripe.active_subscription.
Deprecated: use billing.account_billing_type.
Available options:
STRIPE, AWS_MARKETPLACE, STRIPE_PROJECTS, UNRECOGNIZED Deprecated: use billing.aws.customer_identifier.
Was this page helpful?
