I can't seem to find the correct way to subscribe to webhooks for onedrive for business.
I know the endpoint url is different then regular onedrive.
(https://learn.microsoft.com/en-us/onedrive/developer/rest-api/concepts/direct-endpoint-differences)
So according to the docs the endpoint to subscribe to webhooks should be the following:
https://{tenant}-my.sharepoint.com/_api/v2.0/subscriptions
But when I send a POST request to this endpoint I get a 404.
Getting the drive items via this endpoint works as expected.
(https://{tenant}-my.sharepoint.com/_api/v2.0//drive/special/approot).
Only the "subscriptions" endpoint I can't seem to access.
What am I doing wrong ?
Subscriptions are applied to items, so you'll want:
https://{tenant}-my.sharepoint.com/_api/v2.0/drive/root/subscriptions
The docs seem a little ambiguous in that regard.
Related
I have an instance of APIM which hosts multiple APIs. This include multiple post operations.
I have observed many Get calls being logged for the endpoint which are actually Post. I verified from client who uses it and they are not making any get calls for the same. When I searched IPs logged in app insights it belongs to Microsoft.
Where the actual API is post operation as shown below
May I know why these get calls are made? Is there any possibility these are from APIM?
I raised Microsoft ticket to understand why we are getting unknown Get calls. They analyzed IP address where its coming from then they got to know its coming from Microsoft Teams. If somebody post URL in Teams, then Teams trying to render the url in order to get some information to show in the chat. In this attempt it makes a Get calls
My goal is to use the Facebook webhooks to get a notification whenever an IG user mentions my IG account. For that I have followed these steps:
I have created a Facebook page and connected it with an Instagram business account.
I have created a Facebook app (which is now live) and added the product "webhooks".
I have connected my app with my page.
I have created a webhook and subscribed to the mentions event.
I have tested the webhook, using the tools provided by Facebook and it works.
The problem I'm facing is that I can't get my app to work with real data. I have tried to mention my business IG account from my IG personal account, but nothing happens. My callback url is not getting called.
My app doesn't need users to login, so I'm not sure if I need to send my app for review. Do I need a special permission?
I had the same problem. For my case, when I installed the app via graph api explorer, the page token I was using didn't have the instagram_manage_insights permission. So I granted that permission, got a new token, re did the POST request to the {page-id}/subscribed_apps again with the new token and that fixed the problem. Just for the record, I used a system user token from the business manager.
Did you verified your Facebook app via app review? If not, you won't get production data via a webhook callback for the Instagram. I had the same issue and asked the Facebook support and got following response:
However, this is not the same for instagram or pages. This is just how the product teams have decided to implement it. For app review, you can show a mock process of the flow, using either the test webhook or your own process. The app review is less about technical implementation steps, but just a way to make sure that your app is going to use the permission in a way that follows our guidelines, so mocking the procedure should be fine. The reviewers understand that you do not receive webhooks in dev mode and should take this into consideration.
For more information check out following links:
Why is the Instagram Graph API webhook not working
https://developers.facebook.com/support/bugs/495933900986533/
I just figure it out of this problem.
There is a mistake in the official Instagram webhook guide:
With Graph API version 3.2, the /{page-id}/subscribed_apps edge now requires the subscribed_fields parameter, which currently does not support Instagram webhooks fields. To get around this, use your app's dashboard to subscribe.
https://developers.facebook.com/docs/instagram-api/guides/webhooks/#install-app
However, the app's dashboard subscribe is another function. You need your page to subscribe to some field to receive webhooks
Just POST /{your-instagram-connected-page-id}/subscribed_apps?subscribed_fields=feed&access_token={your-instagram-connected-page-token}
Then you will receive webhooks in live mode.
In our code we are using the below REST API Endpoint https://outlook.office365.com/api/{version}/{user_context}
There was a mention in this link(https://msdn.microsoft.com/en-us/office/office365/api/use-outlook-rest-api) that the above REST API Endpoint will work for a while and that we will need to change to the new REST API. Please can you confirm the until when https://outlook.office365.com/api/{version}/{user_context} URL will be valid.
Thank you
I don't have a specific date to share. Is there some reason you cannot switch to the https://outlook.office.com endpoint immediately? The API is exactly the same, so it should be a simple matter to change.
I try to integrate Instagram into my web app.
I need receive webhook by each comment in my media.
I create a Client in Instagram/developers and POST subscription,
But only receive when posting a media.
When another way,
I try with Facebook Instagram API, and receive webhook from a commets,
but if the user which write the commets isn´t a business account, I´m can´t get a data from the user.
Any suggestion?
Existe another way to integrate API Instagram?
Thanks!
No. You have covered the possible scenario. Comment webhooks are only supported in the FB graph API. And to use that you need to connect with business account. They don't support comment webhooks for non-business account.
This issue has been posted many times before but I haven't found a solution yet. I've contacted Instagram Developer support but a week later I've still had no luck or a response form them so hoping someone here can help me out. My app has been approved by Instagram for basic permissions.
Doing a Form POST to https://api.instagram.com/v1/subscriptions/ with all the relevant data (callback_url, object=user, aspect=media, verify_token, client_secret, client_id) to create a subscription for Instagram User Subscriptions yields the error: APISubscriptionError - Unable to reach callback URL
The callback URL I'm using has logging on it to log all requests which works
when accessed directly via a browser. Using the logs I can see Instagram isn't even reached my callback URL.
The callback URL is accessible publicly over the internet and the domain is being used in production.
The callback URL implements both GET and POST methods (even PUT just in case).
Worked a few weeks ago using a UAT URL.
The callback URL still returns the 'Unable to reach callback URL' with http or https.
I've changed IP addresses, used a VPN and run the post script form different locations.
Tried different parts eg domain.com/instagram/subscriptions or
domain.com/instagramsubscriptions
-Tried a different sub domain and different URL.
Have deleted all subscriptions using the DELETE request
Any help or suggestions would be greatly appreciated.