Authentication (1.1-oas3)

Download OpenAPI specification:

API calls to authenticate the user. These calls are also included in other API documentation for convenience.

Public

Operations that can be called without logging in

Log in to get initial access token.

Logs in either against the organization resolved from the request host, or against a no-organization host with orgTypeId for network login. The unversioned login response includes both token details and the user's self-service permissions for the resolved organization. Each active membership includes missingIdentityVerification. When it is true, call the identity verification status endpoint. The membership.prepaidCardOnFile flag identifies a saved prepaid or unverified card rejected for securing item access, and membership.unableToVerifyCardOnFile flags that the saved card could not be verified (payment processor unreachable - transient, retry).

Request Body schema:
username
required
string

The user's myTurn.com username, or their membership ID with their organization/tool library.

password
required
string

The user's myTurn.com password.

orgTypeId
number

The id of the organization type to use for login. Used only on a host that does not resolve to an organization, and only for organization types that share login tokens ("API Uses Network Login").

Responses

Request samples

Content type
{
  • "username": "string",
  • "password": "string",
  • "orgTypeId": 0
}

Response samples

Content type
application/json
{
  • "username": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "displayName": "string",
  • "emailAddress": "string",
  • "expires_in": 0,
  • "token_type": "Bearer",
  • "access_token": "string",
  • "refresh_token": "string",
  • "roles": [
    ],
  • "isAdmin": true,
  • "isSuperAdmin": true,
  • "adminAccess": {
    },
  • "membership": {
    },
  • "organizations": [
    ],
  • "reservationsEnabled": true
}

Refresh the access token. Deprecated

Request Body schema:
required
grant_type
required
string
Value: "refresh_token"

Must always be "refresh_token".

refresh_token
required
string

The refresh token issued to the client during a previous login or refresh.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "username": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "displayName": "string",
  • "emailAddress": "string",
  • "expires_in": 0,
  • "token_type": "Bearer",
  • "access_token": "string",
  • "refresh_token": "string",
  • "roles": [
    ],
  • "isAdmin": true,
  • "isSuperAdmin": true,
  • "adminAccess": {
    },
  • "membership": {
    },
  • "organizations": [
    ],
  • "reservationsEnabled": true
}

Send an email with a link to reset password to the user who matches the query, if such a user exists in this organization. If no such user exists, the answer is the same as if the user exists. Only one parameter is required out of the 4 possible parameters. If more than one is provided, we match on the first one in this order - email, username, memberId, query. If the query parameter inclues an @ symbol, it is treated as an email address. Otherwise we first look for a match by username. If none is found, we look by memberId.

Request Body schema:
email
string

The user's email address

username
string

The user's myTurn.com username

memberId
string

The user's member id within this organization. If passing forOrgType, the request will look for the user with this member id in any organization within the same organization type as the organization in the url.

query
string

Either an email address, a username or a memberId

forOrgType
boolean

If true, the query is run against all the organizations that have the same type as the organization in the url.

Responses

Request samples

Content type
{
  • "email": "string",
  • "username": "string",
  • "memberId": "string",
  • "query": "string",
  • "forOrgType": true
}

Response samples

Content type
application/json
"If a matching account exists, we will send a password reset to the address on file."

Send an email with a link to reset password to the user who this email address belongs to, if such a user exists in this organization. If no such user exists, the answer is the same as if the user exists.

Request Body schema:
email
required
string

The user's email address

forOrgType
boolean

If true, the query is run against all the organizations that have the same type as the organization in the url.

Responses

Request samples

Content type
{
  • "email": "string",
  • "forOrgType": true
}

Response samples

Content type
application/json
"If a matching account exists, we will send a password reset to the address on file."

Send an email with a link to reset password to the user who this username belongs to, if such a user exists in this organization. If no such user exists, the answer is the same as if the user exists.

Request Body schema:
username
required
string

The user's myTurn.com username

forOrgType
boolean

If true, the query is run against all the organizations that have the same type as the organization in the url.

Responses

Request samples

Content type
{
  • "username": "string",
  • "forOrgType": true
}

Response samples

Content type
application/json
"OK"

Send an email with a link to reset password to the user who this member id belongs to, if such a user exists in this organization. If no such user exists, the answer is the same as if the user exists.

Request Body schema:
memberId
required
string

The user's member id within this organization

forOrgType
boolean

If true, the query is run against all the organizations that have the same type as the organization in the url.

Responses

Request samples

Content type
{
  • "memberId": "string",
  • "forOrgType": true
}

Response samples

Content type
application/json
"OK"

User

Operations available to registered users who are logged in

Details about the current user.

Returns the current user's username, name, display name, email address, organization membership details when the request is scoped to an organization, admin access information, and reservation support for the current organization. Each active membership includes missingIdentityVerification. When it is true, call the identity verification status endpoint. The membership.prepaidCardOnFile flag identifies a saved prepaid or unverified card rejected for securing item access, and membership.unableToVerifyCardOnFile flags that the saved card could not be verified (payment processor unreachable - transient, retry).

Responses

Response samples

Content type
application/json
{
  • "username": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "displayName": "string",
  • "emailAddress": "string",
  • "expires_in": 0,
  • "token_type": "Bearer",
  • "access_token": "string",
  • "refresh_token": "string",
  • "roles": [
    ],
  • "isAdmin": true,
  • "isSuperAdmin": true,
  • "adminAccess": {
    },
  • "membership": {
    },
  • "organizations": [
    ],
  • "reservationsEnabled": true
}

Log the user out of the system.

Responses

Log the user out of the system. Deprecated

Responses

Details about the current user.

Returns the current user's username, name, display name, email address, organization membership details when the request is scoped to an organization, admin access information, and reservation support for the current organization. When called without an organization context using a network-login token, the response may include kiosk-enabled organizations where the user has a membership. Each active membership includes missingIdentityVerification. When it is true, call the identity verification status endpoint for that organization. Each membership may include prepaidCardOnFile to identify a saved prepaid or unverified card rejected for securing item access, and unableToVerifyCardOnFile to flag that the saved card could not be verified (payment processor unreachable - transient, retry).

Responses

Response samples

Content type
application/json
{
  • "username": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "displayName": "string",
  • "emailAddress": "string",
  • "expires_in": 0,
  • "token_type": "Bearer",
  • "access_token": "string",
  • "refresh_token": "string",
  • "roles": [
    ],
  • "isAdmin": true,
  • "isSuperAdmin": true,
  • "adminAccess": {
    },
  • "membership": {
    },
  • "organizations": [
    ],
  • "reservationsEnabled": true
}

Lists which organizations the user belongs to, and describes the membership.

Returns kiosk-enabled organizations in the current myTurn Network where the authenticated user has a membership. Each result includes a short organization record and that user's membership details for the organization. When organization.membership.missingIdentityVerification is true, call the identity verification status endpoint for that organization. Read organization.membership.prepaidCardOnFile to determine whether that organization rejects the saved prepaid or unverified card for securing item access, and organization.membership.unableToVerifyCardOnFile for when the saved card could not be verified (payment processor unreachable - transient, retry).

Responses

Response samples

Content type
application/json
[
  • {
    }
]