curl --request GET \
--url https://api.1password.com/v1/accounts/{account}/users/{user} \
--header 'Authorization: Bearer <token>'const url = 'https://api.1password.com/v1/accounts/{account}/users/{user}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.1password.com/v1/accounts/{account}/users/{user}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.1password.com/v1/accounts/{account}/users/{user}"
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))
}using RestSharp;
var options = new RestClientOptions("https://api.1password.com/v1/accounts/{account}/users/{user}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.1password.com/v1/accounts/{account}/users/{user}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1password.com/v1/accounts/{account}/users/{user}",
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;
}$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.1password.com/v1/accounts/{account}/users/{user}' -Method GET -Headers $headersrequire 'uri'
require 'net/http'
url = URI("https://api.1password.com/v1/accounts/{account}/users/{user}")
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": "IR7VJHJ36JHINBFAD7V2T5MP3E",
"email": "wendy_appleseed@agilebits.com",
"display_name": "Wendy Appleseed",
"state": "ACTIVE",
"create_time": "2024-01-15T10:30:00Z",
"path": "accounts/WX52YXL2MVEPBK43P3R4XMWKXI/users/IR7VJHJ36JHINBFAD7V2T5MP3E"
}Get a user
Retrieve a single user in a 1Password account.
curl --request GET \
--url https://api.1password.com/v1/accounts/{account}/users/{user} \
--header 'Authorization: Bearer <token>'const url = 'https://api.1password.com/v1/accounts/{account}/users/{user}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.1password.com/v1/accounts/{account}/users/{user}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.1password.com/v1/accounts/{account}/users/{user}"
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))
}using RestSharp;
var options = new RestClientOptions("https://api.1password.com/v1/accounts/{account}/users/{user}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.1password.com/v1/accounts/{account}/users/{user}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1password.com/v1/accounts/{account}/users/{user}",
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;
}$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$response = Invoke-WebRequest -Uri 'https://api.1password.com/v1/accounts/{account}/users/{user}' -Method GET -Headers $headersrequire 'uri'
require 'net/http'
url = URI("https://api.1password.com/v1/accounts/{account}/users/{user}")
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": "IR7VJHJ36JHINBFAD7V2T5MP3E",
"email": "wendy_appleseed@agilebits.com",
"display_name": "Wendy Appleseed",
"state": "ACTIVE",
"create_time": "2024-01-15T10:30:00Z",
"path": "accounts/WX52YXL2MVEPBK43P3R4XMWKXI/users/IR7VJHJ36JHINBFAD7V2T5MP3E"
}state field is omitted for users who are neither active nor suspended, such as users who are pending confirmation.
To find a user’s ID, list the users in the account.Authorizations
OAuth 2.0 access token authentication. Request an access token from the OAuth token endpoint using the client credentials for the OAuth application in your 1Password account, then include it in the Authorization header of every request as Bearer <token>. Access tokens expire after 15 minutes (900 seconds).
Headers
An identifiable user agent for your integration, in the format <CompanyOrProductName>/<version>, so requests can be attributed to a specific integration for support, troubleshooting, and usage analytics.
Path Parameters
The unique identifier of the 1Password account, a 26-character uppercase ID. A malformed ID returns 400 Bad Request.
26The unique identifier of the user, a 26-character uppercase ID. A malformed ID returns 400 Bad Request.
26Response
The requested user.
A user within a 1Password account.
The unique identifier (UUID) of the user.
The email address of the user.
The display name of the user.
The current state of the user. Omitted when the user is neither active nor suspended, for example while pending confirmation or in account recovery.
STATE_UNSPECIFIED, ACTIVE, SUSPENDED The date and time the user was created, in RFC 3339 format.
The resource path of the user.
Format: accounts/{account}/users/{user}
Was this page helpful?