Obtain an authentication token (C#)
Version:
Bearer token authentication is used for systems calling the Commerce Engine directly, without going through Sitecore Commerce Engine Connect. To execute any operation in the Sitecore Experience Commerce (XC) system, the calling system must first connect to the Sitecore Identity Server to obtain an authentication token and include it in every call it makes to the Commerce Engine. Other operations can re-use the same token for as long as the token is valid.
The following shows an example of a GetToken request using C#: