When I'm trying to download files from Sharepoint Online using REST, by calling _api/web/GetFileByServerRelativeUrl, sometimes, I'm getting error : The length of the URL for this request exceeds the configured maxUrlLength value.
So, as this is Sharepoint Online, there no way to change this configuration (the limit it self is also not clear, why 256 and not 1024 ??, or why to limit at all ??) So, I was trying to find a solution for this issue and found that I can call another REST method : /_api/web/GetFileById and provide unique id, which is working in 95% of cases, except some case where document library is SitePages or where the URL of the file is really big (even when I'm trying to download using GetFileById), the error here is 404 - not found.
So, web service do allow to access and download those files, BUT web service doesn't work with OAuth tokens (my customers requires OAuth).
Is there any other solution for this ? Or any chance to influence on the 256 chars url limit ?
Thanks