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.

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 for organizations 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",
  • "roles": [
    ],
  • "isAdmin": true,
  • "membership": {
    },
  • "organizations": [
    ]
}

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",
  • "roles": [
    ],
  • "isAdmin": true,
  • "membership": {
    },
  • "organizations": [
    ]
}

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.

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",
  • "roles": [
    ],
  • "isAdmin": true,
  • "membership": {
    },
  • "organizations": [
    ]
}

Log the user out of the system.

Responses

Log the user out of the system. Deprecated

Responses

Details about the current user.

When called on an organization where the user is a member, returns the information about the user's membership in that organization. When called on a host that does not correspond to an organization, but the user logged in using the orgTypeId parameter (also on a host that doesn't correspond to an organization) it will give basic information. In both cases, it includes the list of organizations the user has memberships with.

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",
  • "roles": [
    ],
  • "isAdmin": true,
  • "membership": {
    },
  • "organizations": [
    ]
}

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]