Sign up and authenticate
To gain access to IQM's API and its services, you must first sign up and log in to obtain the authentication required to send requests.
The IQM platform uses bearer authentication tokens to authenticate along with an Organization Workspace ID.
- Sign up and log in both return an access token and a refresh token. The access token remains valid for 24 hours. After that, use the refresh token to get a new access token.
- Every API call also needs your Organization Workspace ID (owId) in the X-IAA-OW-ID header. The sign-up response includes it. After logging in, use Get list of accessible Organizations to find the Organization Workspace IDs that you have access to. To learn how the owId differs from the Workspace ID and User Organization Workspace ID, see Organization and user IDs.
Client ID and Client Secret
Before you can sign up or log in with the IQM API, you need to request a Client ID and Client Secret by emailing support@iqm.com. Once you have obtained these credentials, they are used as the header authorization for signing up and logging in. Send them in the Authorization header as Basic followed by the Base64 encoding of client_id:client_secret. To log in or refresh a token, you can instead send client_id and client_secret as form fields in the request body.
Read more about Client ID and Secret at OAuth.
Sign up
POSTComplete an invitation by setting the invited user's password. This endpoint doesn't create new accounts. A user must first be invited to a workspace, and the link in the invitation email carries the inviteHash. To get an account, ask your workspace owner to invite you or contact support@iqm.com.
The response logs the user in, with the same tokens as Log in plus the user's owId. If the workspace has a redirect URL configured, the response also includes redirectionUrl, that URL with the user's tokens filled in.
| Headers | |
|---|---|
Authorization string required | Basic followed by your Base64-encoded client_id:client_secret. |
Content-Type string required | application/json. |
| Request Schema | |
|---|---|
email string required | Email address of user. |
password string required | Desired password of user. |
inviteHash string required | Invitation hash from the link in the user's invitation email. |
- JSON
{
"email": "user1@iqm.com",
"password": "123456",
"inviteHash": "abc123xyz"
}
{
"success": true,
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399,
"owId": 200001,
"mfa_required": false
}
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "Password is required.",
"field": "password"
},
{
"error": "Email is required.",
"field": "email"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "Please pass invitation hash"
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "User does not exists in the system."
}
]
}
Log in
POSTOnce your account is set up, you can log in. This API accepts a URL encoded form with the user's email and password. Using your Client ID and Client Secret in the header, you can authenticate and log in.
The response includes an access token and a refresh token.
To find the Organization Workspace IDs that you have access to, use Get list of accessible Organizations.
| Headers | |
|---|---|
Authorization string required | Basic followed by your Base64-encoded client_id:client_secret. See Sign up and authenticate. |
Content-Type string required | application/x-www-form-urlencoded. Send the request body as form data. |
| Request Schema | |
|---|---|
grant_type string required | password for login. See OAuth Grant Types. |
username string required | User account email. |
password string required | User account password. |
- JSON
curl -i --location 'https://api.iqm.com/api/v3/ua/oauth/token' \
--header 'accept: application/json, text/plain, */*' \
--header 'Authorization: Basic <base64 of client_id:client_secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=user@iqm.com' \
--data-urlencode 'password=<your password>'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "Bad Credentials or invalid grant type"
}
]
}
{
"error": "Client details are not provided."
}
{
"type": "about:blank",
"title": "Unsupported Media Type",
"status": 415,
"detail": "Content-Type 'application/json;charset=UTF-8' is not supported.",
"instance": "/api/v3/ua/oauth/token"
}
Refresh token
POSTUse a refresh token to get a new access token. This endpoint accepts a URL encoded form with the refresh token. Using your Client ID and Client Secret in the header, you can authenticate and get a new access token.
| Headers | |
|---|---|
Authorization string required | Basic followed by your Base64-encoded client_id:client_secret. See Sign up and authenticate. |
Content-Type string required | application/x-www-form-urlencoded. Send the request body as form data. |
| Request Schema | |
|---|---|
grant_type string required | refresh_token to get a new access token. See OAuth Grant Types. |
refresh_token string required | Refresh token from the login response. |
curl -i --location 'https://api.iqm.com/api/v3/ua/oauth/token' \
--header 'accept: application/json, text/plain, */*' \
--header 'Authorization: Basic <base64 of client_id:client_secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=<your refresh token>'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "Bad Credentials or invalid grant type"
}
]
}
{
"error": "Client details are not provided."
}
{
"type": "about:blank",
"title": "Unsupported Media Type",
"status": 415,
"detail": "Content-Type 'application/json;charset=UTF-8' is not supported.",
"instance": "/api/v3/ua/oauth/token"
}