sharepoint rest
5 TopicsIssues getting SharePoint List Image to my Mobile Image Preview
I am facing issues getting the SharePoint list image to my Mobile App on Image Preview. When I pass the Image URL as in the code below, I am getting a 401 error. I would appreciate, if anybody could suggest a solution for this issue. Image Url = "Tenant name/NewsImagesHF/allergens-banner_0.jpg"; async getImageUrl(url: any) { let options = this._apiHeader(); this._apiGetData(url, options); } async _apiGetData(apiURI: any, options: any) { return new Promise((resolve, reject) => { this._http.get(apiURI, options) .subscribe(res => { resolve(res.json()); console.log(res.json()); console.log(res); }, (err) => { reject(err); }); }); } _apiHeader() { let headers = new Headers(); headers.append('Authorization', 'Bearer ' + localStorage.getItem("token")); headers.append('Content-Type', 'application/json'); let options = new RequestOptions({ headers: headers }); return options; }1.3KViews1like0CommentsResetting the file handler cache Failed
I used postmen and send the following request for resetting file handler cache. GET https://xxx-my.sharepoint.com/_api/v2.0/drive/apps?forceRefresh=1 Authorization: Bearer {access-token} but i get the following error in postmen when executing above request {"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."} Any idea please Thanks1.1KViews1like0Comments