This confirms to SharePoint that the application is trusted for:
You must have:
https://<companyname>.sharepoint.com/_layouts/15/appinv.aspx
You must use a secure SSL - https, not http.
This is the Client ID in SharePoint Online.
The application fields are populated. If they are not, check that you have entered the Application ID correctly.
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Write" />
</AppPermissionRequests>