We're currently testing a Microsoft Graph API integration that works with the Calendar created in Bookings. We aren't running off the Bookings API as it is still in preview and lacks certain data points, but rather interfacing directly with the underlying calendar as it works and syncs properly with Bookings, as long as you stick to basic operation such as GETS and DELETES.
We ran into an odd scenario in which the Graph API returns a 204 NO CONTENT status on a failing DELETE request. The user being tested has REVIEWER folder permissions on the calendar. When a DELETE request goes out, the event does not delete (as intended with someone who only had REVIEWER permissions), however the response received is a 204 NO CONTENT response, which should only be returning upon a successful request according to the Graph API Documentation.
Sample:
//Signed in user is listed a REVIEWER on calendar
REQUEST: DELETE https://graph.microsoft.com/v1.0/users/{id}/events/{id}
RESPONSE: 204 NO CONTENT //Even though calendar event remains
Is this an issue with the Graph API or do I need to get permissions issues for failed requests another way? Seems wrong it would show successful for a failed request, but I know things may get weird working with the underlying calendar.
Try to clear the cache and cookies, and then re-execute the request.
I think there is something wrong with your request URL, please change to:
https://graph.microsoft.com/v1.0/users/{user_id}/calendar/events/{id}
or
https://graph.microsoft.com/v1.0/users/{user_id}/calendars/{id}/events/{id}
After my test, it can work well for me.
Related
I am getting started on an API testing project using supertest, mocha and chai. I am using postman to manually send the requests first to ensure they are working before writing the code for them.
All my get and post commands are working successfully except for this patch request. This is the first patch request I am attempting to send.
Request Headers
Request Body
Code
First request is passing, second is failing
The URL's are identical so I know they are valid and the authorization is working correctly.
I feel that as the first command is passing this is not a sync issue
This definitely needs to be a patch request according to the swagger
I'm new to API testing so would greatly appreciate any insight anyone may have into this issue.
Well nobody ever likes to hear it but it appears my problem has resolved itself after leaving it for a day.
I really wish I had an understanding of why this has happened but for now it appears I will have to go ahead unsure of what caused it or how it was resolved.
I'm setting up a paypal payment option on the project i'm working on.
The authorization structure I use is an hybrid client + server REST.
The client generates the token as expected, after the user clicks "Pay now" on the paypal page.
Then the server receives its data (paymentID and payerID). So, i just ask for a bearer token (or use the one i had stored) and reach the
POST /payments/payment/{payment_id}/execute
endpoint, with no body at all.
Everything works fine, until the REST request, since it gives me a 500 error and no explanation at all of what I could have done wrong. Just in case some PayPal developers are reading this post, i'll also leave the debug id:
d78e7ca9e79b2
Another strange thing is that the
GET /payments/payment/{payment_id}/
request is working fine, also giving me as HATEOAS endpoint, the execute link, identical as the one I use. Did i miss something, in the execute call, so?
I am using the Twitter+oAuth engine in my iPhone app, and I am able to authenticate the user perfectly. I can get statuses with no issue at all, but when I want to post a status, a 401 error is being returned.
This is how I am sending a tweet: [_engine sendUpdate:#"Testing 101"];
It is returning a "Request failed" message with a HTTP 401 error. When I use the same engine to receive statuses, a request succeeded message is being returned.
Why is this happening?
I can receive statuses perfectly, multiple times a minute. That request is succeeding with no difficulty, but the same engine is returning a 401 when trying to post.
Make sure your callback url is not blank. This callback url does't have to be valid, or even exist.
Try not to submit the same update over and over. Twitter sees this as spam and will eventually refuse to post your updates.
Also, see Twitter Error & Response Codes.
401 Unauthorized Authentication credentials were missing or incorrect.
This leads me to think too, that you aren't logging in or passing the correct credentials before posting.
I have an application that goes and gets a users messages from their facebook account, but I've hit an error.
The user in question has a thread between him and me in his inbox, however it doesn't show up in his API call to /me/inbox with his specific access_token.
I do have a valid token (it works for all other calls), and I know it should be working fine (I am opening it in my browser directly to debug, and the data just does not exist).
There is no second page to view, no limit or timestamp imposed upon it, just missing data.
For testing, we do have every single API permission offered, so I know it is not a permissions problem.
Does anyone have any idea why this could be happening, and how to fix it?
I was struggling with the same problem. I found that using the `/me/threads' endpoint delivers much more complete data.
Update:
However I found out that this endpoint is not available to non-developers for the time being:
https://developers.facebook.com/docs/reference/api/thread/
getting the error {"error":{"message":"(#100) Can only call this method on valid test users for your app","type":"OAuthException"}} whenever trying to write to any facebook end point. Reading (GET) works fine, writing (POST) fails. Does anybody know how to resolve this?
I have also opened a ticket on FB dev site:
http://developers.facebook.com/bugs/184198634991192?browse=search_4e93328871c8a3231774584
The problem does not occur is I would shoot the POST request from my browser as if I am the user.
The problem does occurs only when sending from our servers on behalf of the user from one of our dev machines which have other subdomain names instead of www (such as dev1.blablabla.com & dev2.blablabla.com, while the app is registered to www.blablabla.com).
So the question is, does facebook attempt to do a reverse DNS lookup on all write requests to verify the source?
I believe your requirement is to get the user details of the owner of Facebook access token (normally the currently logged in user)
For that you have to issue a GET request and not a POST request.
The reason why it works when fired from the browser is that when you submit a query through the address bar it is send as a GET request, and when sent from your server it is send as POST and fails producing the error message mentioned in your post.
Facebook doesn't do a reverse DNS lookup on your write request and not need to configure anything in your server related to it.
Hope the answer is clear enough for you.