Dropbox API error status codes - dropbox-api

I was using Dropbox API, but could not find a standard list of status error codes to respond to such as here: https://api.imgur.com/errorhandling#400
Imgur offers an awesome list. Does dropbox docs have any place like this?

Check out the Error Handling section of https://www.dropbox.com/developers-v1/core/docs.

Related

How do I get the Explore and Stream section from the SoundCloud API

I can't seem to find the section in their api reference. I tried it as a searchquery but it doesn't seem to work. api.soundcloud.com/stream or /explore return a 404, so that doesn't work either
Thats actually not a part of the public API.
But its quite easy to grab your call from the dev console.
Thats an example call from my user:
https://api-v2.soundcloud.com/stream?user_id=e87647259112403eaa239b6e2c510e46&sc_a_id=e87647259112403eaa239b6e2c510e46&user_urn=soundcloud%3Ausers%3A1672444&promoted_playlist=true&limit=10&offset=0&linked_partitioning=1&client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=a089efd
To make that call work, you need to modify the headers.
These answers may help you:
Retrieving the "recommended" playlist via API call?
soundcloud: Is api-v2 allowed to be used and is there documentation on it?
How to get "all" tracks related to an artist with Souncloud API
Using these endpoints does not go inline with SoundClouds TOS.

Facebook Graph API: /id/picture returns "Invalid response"

I have a Facebook application that has been retrieving pictures using the guidance found here: Using Pictures
This has been working up until recently, where now if I retrieve an item picture using the following:
/<id>/picture
I get this response:
{
"error": "Invalid response"
}
Is this a known issue? This has been working up until around this week.
Instead of picture, you should use profile_picture if you want the URL of the pic, just like-
<ID>?fields=profile_picture
Example
And if you want to use the image directly you can use:
http://graph.facebook.com/<ID>/picture
Example: http://graph.facebook.com/Shadowfax.sahil/picture
Using the /ID?fields=picture does not help when you'd like to get an arbitrarily large image. I have experienced Invalid Response when calling /ID/picture in the Graph API and found a solution that fixes it.
Try /ID/picture?redirect=false&width=800. The redirect=false option seems to fix the problem with invalid response from the API.

MGTwitter is not working

I don't want default twitter to open because it should be compatible with ios < 5 also .
I've used MGTwitterEngine. But it doesn't post tweets. Before few days it was working fine with ios5 too. But now it's not working. I think twitter demo url is depreceated , or not supported with ios5 & 6. What could be the reason? while posting something to twitter the request gets failed & I'm gettiing following error :
Error Domain=HTTP Code=404 "The operation couldn’t be completed. (HTTP error 404.)
Any help would be appreciated !!
Twitter deprecated API version 1 url.
In MGTwitterEngine.h line 40 change
#define TWITTER_DOMAIN #"twitter.com"
to
#define TWITTER_DOMAIN #"api.twitter.com/1"
More info https://dev.twitter.com/discussions/10803
Modifications...
1. Change the TWTTER_DOMAIN in the MGTwitterEngine.m line 40 (pat posted).
2. Chenge the OAuthConsumer.h remove all OAuthconsumer strings.
3. Chenge the HTTP url with SA_OAuthTwitterEngine.m line 65~67, add the api string before twtter.com
Version 1 of the API is now deprecated. This document may describe an outdated version of the API. Please move to Version 1.1 of the API as soon as possible.
Go through this document.
https://dev.twitter.com/docs/api/1.1/post/direct_messages/new
Point to be noted
Api format should me json
Api version v1.1
sender and receiver should follow each other.
Example Request
POST : https://api.twitter.com/1.1/direct_messages/new.json
POST Data : text=hello&screen_name=rajneesh071

facebook chat on the iphone using xmppframework

Well i started of by following all the instructions here:
http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo
I used the recommended fork of the facebook api and tried the latest from:
https://github.com/facebook/facebook-ios-sdk/
My problem starts with the following error:
< failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">< not-authorized/></failure>
The error is a reply from facebook to xmppframework s response to a authentication challenge. The response that is made by the iphone is base64 encoded msg when i decode it i find 2 of the values are null:
api_key=(null)
and the
session_key=(null)
This is obviously the reason facebook is returning that error. But the problem i have is i cant seem to find any where to set these values in the framework. Besides i think the session_key should be pulled in from facebook anyway.
I guess what i want to know is a couple of things.
Has any one got the xmppframework working with facebook on a iDevice?
If you have got it working did you have to stray from the path of the instructions on http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo ?
do you know of any other method to get facebook chat working on the iphone?
Any suggestions or help for my current dilemma would be appreciated. Happy to share my code if you want.
cheers
I wrote the Facebook integration for XMPPFramework. The api_key and session_key, come from a call to auth.PromoteSession. Facebook is trying to deprecate that call, so to enable it, you must follow step 7, in the HowTo:
Under Migrations, change Disable Deprecated Auth Methods from Enabled to Disabled and Save Changes.

List of Facebook error codes

I'm looking for a list of all Facebook can return when you try to fetch infos using Graph API. Can anyone help?
Facebook returns a 400 HTTP error, and a JSON content like:
{
"error": {
"type": "OAuthException",
"message": "Invalid OAuth access token signature."
}
}
I'm searching the different returns of the same kind it is possible to get.
Facebook used to have this published somewhere, but for whatever reason it was removed. But you can find the full list here:
http://www.takwing.idv.hk/tech/fb_dev/faq/general/gen_10.html
There seems to be a list now for the errors.
I posted answer for the same question here: Facebook Graph API error code list
(I found the list here https://developers.facebook.com/docs/graph-api/using-graph-api/error-handling)
In case Takwing's copy ever comes down, here's another copy: http://fbdevwiki.com/wiki/Error_codes
These codes were primarily for the REST API, but they do also come up with the Graph API. Some of the Graph API calls have underlying FQL calls that return the FQL error codes. And the direct FQL queries are still part of the currently accepted API.
Update: I'm trying to keep this list up-to-date. Please feel free to make changes as you encounter new errors.
I am trying to keep an updated list of error codes based on previous outdated information.
You can find the repo here http://github.com/phwd/fbec and it has been updated with Test User and Credit Error codes from the Facebook Documentation.
Currently looking for the constant name for "Error Code 2500" and some error descriptions may have changed. I hope to keep on top of this.
There is an official error code page, now:
https://developers.facebook.com/docs/marketing-api/error-reference/
It still doesn't look comprehensive...