How to get chart from Excel in onedrive using graph API - microsoft-graph-api

While trying to get Charts from a Worksheet, I am getting an "Internal Error" response.
I am issuing a GET request where demo.xlsx is my excel file and CHART2 is the name of the sheet:
/v1.0/me/drive/root:/demo.xlsx:/workbook/worksheets/CHART2/charts
Furthermore, if I have no charts in the sheet, I don't receive an error response, only an empty array (as expected).
Interestingly enough I can get a Chart if I know it's name using either of these two paterns:
('Chart-Name')/Image(width=400, height=200, fittingMode='
/charts/Chart-Name/name

Related

Weblink from groups calendarview MS Graph API doesn't work event after encoding item id

webLink form groups calendar view returned in MS Graph API doesn't work correctly.
Steps to reproduce:
Create an event in a calendar group
call Graph API https://graph.microsoft.com/v1.0/groups/{GroupId}/calendar/calendarview?$Top=10&$select=webLink,subject,id&startdatetime=2023-01-30T16:54:11.890Z&enddatetime=2023-07-30T15:54:11.891Z
returned weblink example "webLink": "https://outlook.office365.com/calendar/deeplink/read/group/tenant.onmicrosoft.com/AccountingO365_Cs162adfsFixCalendar/AAMkAGVkOGVlMDM4LWNlY2ItNDNkZS1hY2I1LTQ4YzJjZDNkMDVmZAFRAAgI2wPnQwhAAEYAAAAAbAkvu4LrVEiQM4b4wHlrSwcAjqRLsHAS6ECpPiwPJ4o/wAAAAAABDQAAjqRLsHAS6ECpPiwPJ4o/wAAAAAARFAAAEA==",
encode Item ID AAMkAGVkOGVlMDM4LWNlY2ItNDNkZS1hY2I1LTQ4YzJjZDNkMDVmZAFRAAgI2wPnQwhAAEYAAAAAbAkvu4LrVEiQM4b4wHlrSwcAjqRLsHAS6ECpPiwPJ4o/wAAAAAABDQAAjqRLsHAS6ECpPiwPJ4o/wAAAAAARFAAAEA==
open the URL in the browser https://outlook.office365.com/calendar/deeplink/read/group/tenant.onmicrosoft.com/AccountingO365_Cs162adfsFixCalendar/AAMkAGVkOGVlMDM4LWNlY2ItNDNkZS1hY2I1LTQ4YzJjZDNkMDVmZAFRAAgI2wPnQwhAAEYAAAAAbAkvu4LrVEiQM4b4wHlrSwcAjqRLsHAS6ECpPiwPJ4o%2FwAAAAAABDQAAjqRLsHAS6ECpPiwPJ4o%2FwAAAAAARFAAAEA%3D%3D
browser returned a blank screen with a loading icon
network tab shows 404 for the request URL: https://outlook.office365.com/search/api/v1/recommendations
with the following response
{"error":{"code":"ErrorItemNotFound","message":"The specified object was not found in the store.","target":"","httpCode":404,"recommendedAction":"Escalate to [3SRecAlerts#microsoft.com] if the issue persists."},"Instrumentation":{"TraceId":"d5522a1a-5f99-264e-bcc7-ca327b5a3e67"}}
expected to open the group calendar event details.

Is there a way to get all Internet Message Headers of an item attachment?

I have a requirement to read all Internet Message Headers of an Item Attachment.
Using following query, it is possible to get headers. But not all.
var itemAttachment = await graphServiceClient.Users["id"]
.Messages[messageId]
.Attachments[messageWithItemAttachment[0].Id]
.Request()
.Expand($"microsoft.graph.itemAttachment/item")
.GetAsync();
I have found following resource which provides a way to read missing headers of an item.
Get message using Graph missing some InternetMessageHeaders
I need to know how can I use such expansion within a expand query?

Zoho creator ,Invalid JSON payload received, when trying to integrate creator-form-data to google sheet

Objective: I am trying to integrate creator-form-data with google-sheet using google-sheet-api-v4.
I am able to create an empty sheet(data params being empty ) at google spreadsheets.
but i don't know ,how to create sheet with data-params , to either-
(1) assign title ,to spreadsheet , or
(2) write any data, to spreadsheet
error received : using deluge to perform task no. ( 1 ), the error thrown is :
Invalid JSON payload received. Unexpected token
Note:
(1)Oauth credentials are checked and correct,
google access token is also valid, confirming via
Google-oauth-playground
(2) i am able to assign title and data from google-try-api-platform,but no success from deluge side.
google-sheet-try-api
The issue is solved now ,in postUrl the post-data to be posted , must be converted from json to string (params=data.toString(); ).
I had sent post-data in json format thats the mistake I made.
Below is correct sample code for deluge:
append_data = {"values":{{thisDate,thisQuantity}}};
final_append_data = append_data.toString();
response = postUrl(append_data_sheet_url,final_append_data,mymap,false);
Note: variable "final_append_data" is converted to string.

Is there still "no API to manage consumer googlegroups.com groups programatically"?

In an answer to this 2014 post
Unable to retrieve members of a google group, getting Invalid Input
you read: "There is no API to manage consumer googlegroups.com groups programatically".
Is this still the situation in 2018?
I tried to follow the suggestion in answer 3 of the post How to get the list of members in a Google group in Google app script (Admin SDK)? but I get the following error message:
ReferenceError: "AdminDirectory" is not defined. (line 9, file "Code")
where line 9 (and following) is (are):
page = AdminDirectory.Members.list(groupKey,
{
domainName: 'googlegroups.#com',
maxResults: 500,
pageToken: pageToken,
});
Searching to understand the error I found the reference page for Members: list. Using the "Try this API" form in that page I get the error reported in the first post I mentioned.
If it is NOT true that "There is no API to manage consumer googlegroups.com groups programatically", is there a guide to copy the list of the members of a group I own in a google-sheet sheet? (I mean to copy via a function, non by hand exporting and reimporting the CSV)
Many thanks, Roberto Scotti
It's 2021 and I still can't find any evidence there's an API for #googlegroups.com groups, sadly.

Proper way to get facebook story image?

Using the using the Facebook Graph API/SDK for iOS I'm getting the users News Feed with https://graph.facebook.com/me/home. Some of the news feed items return a "story":"xxx" in the JSON response, if the stories contain an image it will be accompanied by a "picture" element. The picture element always returns the small image size.
Here is an example:
"id":"100000238965505_364153823602580",
"from":{
"name":"Cristine Candelaria",
"id":"100000238965505"
},
"story":"Cristine Candelaria was tagged in Arielen Magno Bismar's photo.",
"picture":"http:\/\/photos-g.ak.fbcdn.net\/hphotos-ak-snc7\/431768_2610303545476_1491618385_31927362_2089838362_s.jpg",
"link":"http:\/\/www.facebook.com\/photo.php?fbid=2610303545476&set=at.2610291065164.2111576.1491618385.100000238965505&type=1",
"icon":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yz\/r\/StEh3RhPvjk.gif",
"type":"photo",
"object_id":"2610303545476",
"application":{
"name":"Photos",
"id":"2305272732"
}
I've tried using what Facebook recommends in the API https://graph.facebook.com/2610303545476/picture, however this always returns a false in the JSON response and I've also tried just getting the feed details via [Graph API URL]/100000238965505_364153823602580 (sorry I can only post 2 hyperlinks). This does not yield any extra usefully information.
I've discovered that if you manipulated the end of the "photo" element URL and simply switch the _s to _n you will get the normal image size.
My question is what's the proper way to get the image and the text associated with that image (ex: first time at the super bowl...) for a News Feed using the Graph API?

Resources