"Token type is not allowed" error on sharepoint search API

Occasional Visitor
Aim:- To access sharepoint through REST Api
 
Steps taken:- 
 
  1. Created site on sharepoint.
  2. Registered site as an app using https://<<domain>>/sites/<<site name>>/_layouts/15/appregnew.aspx
  3. Granted tenant scope permission using https://<<domain>>/sites/<<site name>>/_layouts/15/appinv.aspx
  4. Permission xml used
  5. <AppPermissionRequests AllowAppOnlyPolicy="true">
      <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />
    </AppPermissionRequests>
          Headers
          Content-Type:application/json;odata=verbose
          Accept:application/json;odata=verbose
          Authorization:Bearer <<access token from step 5>>
 
         Got below error message
          {"error":"invalid_request","error_description":"Token type is not allowed."}
1 Reply