Identity

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
    }
  ]
}
FieldTypeDescription
userIdstringStable identifier for the JobTek user.
emailAddressstringEmail address associated with the account.
companiesarrayJobTek companies available to this user.
companyIdstringStable identifier for the company.
companyNamestringDisplay name of the company.
isOfficeUserbooleanWhether the user has office access.
isResourcebooleanWhether the user is a field resource.
isOwnerbooleanWhether the user owns the company.
isBillingUserbooleanWhether 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>();

Errors

401The bearer token is missing, invalid, expired or revoked.
403The token does not have a supported JobTek API permission.
429The request limit has been reached. Wait for Retry-After.