Context Token without loading(accessing) SharePoint Site

Microsoft

How I can get Context Token without loading(accessing) SharePoint Site. I have SharePoint site URL and I did the app registration Client ID and Client Secret also. I provide the appinv information also to add permissions and Trust the app. But my requirement is I don't want to load the SharePoint site but want to access the SharePoint Context Token in one apicontroller class.

Information I am having :
Site URL .
Client ID and Client Secret.

This is my endpoint URL which I want to hit and to get the context from sharePoint.
https://<AzureSite>/api/testapi/?SPHostUrl=<siteURL>&SPLanguage=en%2DUS&SPClientTag=0&SPProductNumber=16%2E0%2E6105%2E1204

0 Replies