I'm integrating Microsoft Teams into my app using microsoft graph API.
But with the API to get list message, I used parameter $top={pageSize} for pagination, then I got surprised that in the first call, the response returned "pageSize - 1" records, not exactly the number of pageSize.
In contrary, the API to get list replies, it returned exactly "pageSize" records in the first call.
I don't understand why is there a difference like this between message and relpy. Can anyone help me?
This is the pattern of the API that I used:
https://graph.microsoft.com/beta/teams/{teamId}/channels/{channelId}/messages?$top={pageSize}
https://graph.microsoft.com/beta/teams/{teamId}/channels/{channelId}/messages/{messageId}/replies?$top={pageSize}
We could able to reproduce the issue on our side raised a bug.
Related
Issue:
First API calls only returns top 3 posts.
The next_url returns no data(data array is empty and pagination string is null)
The 4th post is suspect because I am unable to get it with API calls and it is not returned in the first API call.
Details:
Using v1/users/self/media/recent endpoint
Using Javascript to loop through calls, using "next_url" for the 2nd and subsequent call.
Using Access Token
Worked fine(returned all posts) until "the 4th post" was made
Why do I think one specific post is the issue? Because I am unable to retrieve it using the API. If I set the max_id to this post id, then I get all other posts before this post.
If I leave max_id out, the first call gets all posts newer than this post.
Verified that I am not in a Sandbox.
Has anyone encountered this before? and why would one post be breaking the next_url API call? Is there something in the post causing this?
I can't give out the IG account, sorry I know that would help, but it needs to remain private.
I am a developer on a project that makes extensive use of the legacy Instagram API. It has, for a long while now, been extremely flakey. We have experienced your exact issue many times and there is no practical solution.
However, all Instagram APIs have now (finally!) been migrated to Facebook. You should use the new Instagram Basic Display API which will be properly supported going forward.
We have created tenant and around 1200 groups under it and have been trying to search for documents through Graph API.
Here's the query: https://graph.microsoft.com/v1.0/groups/{group_id}/drive/root/search(q='c')
We are sure that there is document with 'c' in name uploaded to the group.
This query was returning results when there was couple of groups created on the tenant. After around 800 groups created, Graph API started to return results very slowly, and on 1200 stopped to return any results.
Is there any throttle or there are some issues on Graph API?
Thanks in advance.
It is possible your requests are being throttled. If you are seeing HTTP 429 responses that is the case.
You could consider using the graph batch API to issue multiple queries at the same time vs. doing each one individually, this will help with not being throttled also.
Combine multiple requests in one HTTP call using JSON batching
Thank you for the response.
The solution you proposed is not acceptable for us since as I wrote in the question, we are facing this issue even we try to query just one group at the time: https://graph.microsoft.com/v1.0/groups/{group_id}/drive/root/search(q='c')
Any other solution?
Thanks
I wan't to fetch only messages that are only internal to organization.
Right now the way i see is fetch domains first then for each message see if from/sender domain belongs to that message , based on that differentiate.
But this is lengthy process and not a foolproof technique.
Is there any GRAPH API query i can use which readily provides this ?
It does not apear that the REST API queries for Office 365 includes this information directly in the messages. From the Version 2.0 And the Beta this is not included in message output.
However, it looks like you might be able to get it from the REST API via the headers.
Try the following query:
https://graph.microsoft.com/beta/me/messages?$select=internetMessageHeaders&$top=1
This takes top one messages and shows you the email header of the message.
In the header look for X-OriginatorOrg. The value should be the main domain of your organisation.
Alternatively you can look at the X-MS-Exchange-Organization-MessageDirectionalityheader. If the value here is Originating it should come from inside your own organisation.
I am using node.js(Meteor) for calling Amazon MWS ListMatchingProducts API for getting all products of my seller account . Its running sucessfully and i am getting the response , but as the documentation said that only ten(10) products are returned at one time. So i just want to know how we get products more than 10 . In the doc Amazon also said that you can submit NextToken with a "ByNextToken" operation to request additional pages.But i am not getting any nextToken or related to that nextToken field on my response.So how do i get the nextToken from there side or how can i get more than 10 products from that API. As i also check on one post they said that we need to use Reports for that but i want to use ListMatchingProducts API for that and want result more than 10.
Please provide me any suggestion or guidance how can i achieve that.
Any help would be appriciated
Thanks
You want to call the Reports API using the Inventory Report report type or one of the other Listing Report types. That is the way to go. The ListMatchingProductsoperation of the Products API is meant to be a search, based on a query. Yes, it only lists ten products but it does not give you a NextToken like some of the other operations. Knowing your Report Type and Marketplace ID, you can submit those to the Reports API with your credentials and get back all of your products all at once and there is no searching involved.
What I would also suggest is to use the Amazon Scratchpad to play around with your operations to make sure you get what you expect, then plug it into your node.js project.
My application uses hereNow api. I checked-in CORRECTLY (i.e. physically present in the location) to a venue and then var_dump the request response from calling the hereNow endpoint, so it returns "count" but "items" is empty as shown below.
string '{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":1}}],"response":{"hereNow":{"count":1,"items":[]}}}' (length=138)
I attempted the same thing using foursquare explorer but obtained similar result. Could you kindly explain why this could be so and what is the idea behind "unreadcount". Thank you.
a) Make sure that the OAuth token you are using to make the hereNow request is for the same user who checked in. You must be acting on behalf of a user who has checked in to a venue to see who is "here now"
b) It's possible that your check-in is being recognized as a cheat because you have checked in too frequently recently, or the lat/long coordinates provided by your device were not accurate enough.