EMA C++ Developers Guide : 6 Consuming Data from the Cloud : 6.4 Version 1 Authentication Using oAuth Password and Refresh_Token : 6.4.2 Obtaining Initial Access and Refresh Tokens
 
6.4.2 Obtaining Initial Access and Refresh Tokens
To obtain an access token, the RTSDK API sends its username, Client_ID, and password in a single message to the Delivery Platform.
 
TIP: You can also specify tokenScope and clientSecret in the OMMConsumerConfig.
In response, the Delivery Platform sends an access token, its expiration timeout (by default: 300 seconds), and a refresh token for use in the login reissue process (for details on the expiration timeout and login reissue process, refer to Section 6.4.3). The API must obtain an access token before executing a service discovery or obtaining market data.
The following diagram illustrates the process by which the RTSDK API obtains its tokens:
Figure 2. Obtaining an Authentication Token