Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To login you need to use an a valid account who has permission to use the API.

Encrypting a plain text password

Link: https://au.itwocx.com/api/latest24.08/api/help/index#!/Login/Login_EncryptPassword

Logging In with Email and Password

Link: https://au.itwocx.com/api/latest24.08/api/help/index#!/Login/Login_ByEmail

By passing using a HTTP POST containing a json object containing a valid email address and encrypted password you will receive a session key which can be used for all other interactions.

Code Block
{
  "Email": "example@mail.com",
  "EncryptedPassword": "***encrypted***"
}

...

Logging In with Azure Active Directory (AD) - Single Sign On (SSO)

If the user you want to login as belongs to a company who has configured Azure AD - configured Single Sign On (SSO) - Azure AD, you will need to authenticate with Microsoft first to get a token which permits users to access the iTWOcx resource.

Authenticating with Microsoft to receive an Access Token is well documented here:
https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-overview

Depending on the authentication flow for the scenario being implemented you will need some or all of the following information:
Authority: https://login.microsoftonline.com/common
iTWOcx Resource: 52e5f8a4-8b0e-455f-9df4-5beb7c37dd18
ClientId: (GUID of the application configured for SSO in your Azure AD tenant)
ReturnUrl: https://au.itwocx.com/cxR/Authentication

Once you have an access token you would pass that token to iTWOcx by adding a header to the HTTP request:

Code Block
Authorization: Bearer {accessToken}


This header against the following interface will then return a session key which can be used for all other interactions.
https://au.itwocx.com/api/latest24.08/api/help/index#!/Login/Login_ByUserToken

Tip
titleCode Sample(s)
  1. C# - Logging In with SSO
  2. Javascript - Logging In with SSO

Using the session key

Link: https://au.itwocx.com/api/latest24.08/api/help/indexindex#!/


Copy & Paste the session key received from logging in into the api_key field in the top right hand corner and click Explore


Once the page refreshes you can then use any of the interfaces, to for example retrieve a list of Projects.