Skip to main content
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>",
  "created_at": "<string>",
  "billing": {
    "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>",
  "external_billing_account_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json

OK

Account information.

id
string
required

The account ID.

name
string
required

The account name.

tier
enum<string>
required

The account tier.

Available options:
ACCOUNT_TIER_INVALID,
ACCOUNT_TIER_BASIC,
ACCOUNT_TIER_PRO,
ACCOUNT_TIER_ENTERPRISE,
ACCOUNT_TIER_TRIAL,
UNRECOGNIZED
account_status
enum<string>
required

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
created_at
string
required

The account creation timestamp.

billing
object
required

The account billing information.

stripe_customer_id
string | null

Deprecated: use billing.stripe.customer_id.

active_subscription
string | null

Deprecated: use billing.stripe.active_subscription.

account_billing_type
enum<string>

Deprecated: use billing.account_billing_type.

Available options:
STRIPE,
AWS_MARKETPLACE,
STRIPE_PROJECTS,
UNRECOGNIZED
external_billing_account_id
string | null

Deprecated: use billing.aws.customer_identifier.