As a high-level overview, there are a few steps you can follow -
OAuth -
There are a few framework/libraries that supports C++ on OAuth. POCO, OAuth2CPP, or CPP-REST-SDK are some options. We used POCO before, have a look at their libraries available -
POCO C++ Libraries[
^]. Google returned tons of search items on POCO -
poco c++ oauth2[
^]
To work of a tutorial, one can be found at -
Tutorial: Securing an API by using OAuth 2.0[
^]
Tokens -
After you have successfully authenticated your API, generate access tokens for authorized users only - full tutorial available at -
Learn about token-based authentication[
^].
You can also read up on how to create tokens at -
The Full Guide to API Token Generation[
^]
TLS -
Lastly, acquire an SSL/TLS certificate for your API's domain name. a Tutorial on configurating your API using SSL Certificates can be found at -
Configuring the REST API by using SSL certificates[
^].
a Tutorial on TLS/SSL is available at -
WHAT ARE TLS/SSL CERTIFICATES[
^]
As I mentioned above, this is just a pointer, it should direct you if you go into each item in-depth.