Access tokens - Metasys - LIT-12013522 - Software Application - Basic Services client library for .NET (and COM) - Metasys API - 4.2

Metasys REST Client for .NET and COM Developer Guide

Brand
Metasys
Product name
Basic Services client library for .NET (and COM)
Metasys API
Document type
API Reference Guide
Document number
LIT-12013522
Version
4.2
Revision date
2021-04-07
Language
English

If you want to use the authorization token in a different HttpClient use the AccessToken object returned by these methods, or use the GetAccessToken method.

Table 1. Login and access token, using the Credential Manager .NET signature
Library method name TryLogin
Description Login to the client.
Method signature AccessToken TryLogin(string credManTarget, bool refresh = true);
Method input parameters
  • credManTarget: name of the credential defined in Windows Credential Manager.
  • refresh: if true, use to refresh the value of the returned token.
Return value An AccessToken object.
Table 2. Login and access tokens method, using the username and password .NET signature
Library method name TryLogin
Description Login to the client.
Method signature TryLogin(string username, string password, bool refresh = true);
Method input parameters
  • username: API user name defined to login to Metasys.
  • password: password defined to login to Metasys (for API user).
  • refresh: if true, use to refresh the value of the returned token.
Return value An AccessToken object.