GET /v1/identity
Return the signed-in user and the JobTek companies that user can access.
Authorization
Requires a bearer token with jobtek.api, jobtek.api.read or jobtek.api.write.
Request
GET https://api.jobtek.com/v1/identity
Authorization: Bearer <access_token>This endpoint has no query parameters or request body.
Response
{
"userId": "2f8b9332-21f6-4ef3-889a-a8cf08ef3bd3",
"emailAddress": "developer@example.com",
"companies": [
{
"companyId": "6f9619ff-8b86-d011-b42d-00cf4fc964ff",
"companyName": "Example company",
"isOfficeUser": true,
"isResource": false,
"isOwner": true,
"isBillingUser": true
}
]
}
| Field | Type | Description |
|---|---|---|
userId | string | Stable identifier for the JobTek user. |
emailAddress | string | Email address associated with the account. |
companies | array | JobTek companies available to this user. |
companyId | string | Stable identifier for the company. |
companyName | string | Display name of the company. |
isOfficeUser | boolean | Whether the user has office access. |
isResource | boolean | Whether the user is a field resource. |
isOwner | boolean | Whether the user owns the company. |
isBillingUser | boolean | Whether the user manages billing. |
Example
using System.Net.Http.Headers;
using var request = new HttpRequestMessage(
HttpMethod.Get,
"https://api.jobtek.com/v1/identity");
request.Headers.Authorization =
new AuthenticationHeaderValue("Bearer", accessToken);
using var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var identity = await response.Content.ReadFromJsonAsync<IdentityResponse>();using System.Net.Http.Headers;
using var request = new HttpRequestMessage(
HttpMethod.Get,
"https://api.jobtek.com/v1/identity");
request.Headers.Authorization =
new AuthenticationHeaderValue("Bearer", accessToken);
using var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
var identity = await response.Content.ReadFromJsonAsync<IdentityResponse>();const response = await fetch(
"https://api.jobtek.com/v1/identity",
{ headers: { Authorization: `Bearer ${accessToken}` } }
);
if (!response.ok) throw new Error(`JobTek returned ${response.status}`);
const identity = await response.json();import requests
response = requests.get(
"https://api.jobtek.com/v1/identity",
headers={"Authorization": f"Bearer {access_token}"})
response.raise_for_status()
identity = response.json()<?php
$request = curl_init("https://api.jobtek.com/v1/identity");
curl_setopt_array($request, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer {$accessToken}"],
]);
$body = curl_exec($request);
if (curl_getinfo($request, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException("JobTek API request failed");
}
$identity = json_decode($body, true, flags: JSON_THROW_ON_ERROR);curl https://api.jobtek.com/v1/identity \
--header "Authorization: Bearer $ACCESS_TOKEN"Errors
401 | The bearer token is missing, invalid, expired or revoked. |
403 | The token does not have a supported JobTek API permission. |
429 | The request limit has been reached. Wait for Retry-After. |