The payment_methods_readonly scope is coming invalid with GET https://login.uber.com/oauth/v2/authorize?
The payment_methods_readonly scope is deprecated. You should use the request scope which gives you access to the /v1/payment-methods endpoint.
According to the Uber API changelog and the Scopes documentation page the payment_methods_readonly scope has been removed/deprecated:
2016-01-16 Change scope for GET /v1/payment-methods from
payment_methods_readonly to request
Related
I'm trying to make some GET calls through Postman to the following endpoint:
https://api.xero.com/api.xro/2.0/Reports/BalanceSheet
getting this error:
{"title":"Unauthorized","status":401,"detail":"AuthorizationUnsuccessful","instance":"674c99d2-0ae3-4940-b23b-aec74cef79ea"}
The docs say this is a user roles issue, and suggests "view reports" access is off, but I'm pretty sure that's all set up correctly:
screenshot of user role options
It works fine through the API previewer, so I can't see what I'm missing.
Any help?
If it makes a difference, I'm using Oauth2.0 route.
You'll likely be missing the accounting.reports.read scope.
During the authorisation process, when you direct your user to the https://login.xero.com/identity/connect/authorize... url, try including accounting.reports.read in scope query parameter (along with your existing scopes, of course).
I am trying to access campaigns of the facebook account. Using python lib: https://github.com/facebook/facebook-python-ads-sdk
Receive error: (#100) Tried accessing nonexisting field (campaigns) on node type (AdAccount)
Url: https://graph.facebook.com/v2.11/{account_id}/campaigns
Everything worked fine for months. Now, even facebook page for this url is empty: https://developers.facebook.com/docs/marketing-api/reference/ad-account/campaigns/
Any thoughts, what's the problem?
Seems to be a bug.
Reported here: https://developers.facebook.com/bugs/707332642990208/
Works perfectly without time_range param.
So, could be temporary solution.
I don't know if this is a bug or not: facebook does this from time to time and is implementing check routines for parameters - in fact "adaccounts don't have any parameters:facebook api reference adaccount reading)
The error you are getting (#100) says "invalid parameter" (facebook reference adaccount validation rules), this is, because you may have defined the time_range and you are asking api for campaigns in an adaccount. But: for adaccount edge time_rage parameter is invalid.
The solution is to FIRST asking api for https://graph.facebook.com/v2.11/{account_id}/campaigns and after this defining the (time_range) parameter(s) for the insights of your campaign.
Here is my auth url
https://login.uber.com/oauth/v2/authorize?client_id={{client id}}&response_type=code&scope=profile request
Is theire any issue in above url.
Is the request scope configured in your app? The list of scopes in the scope parameter has to be a subset of the scopes you configured.
You could try the same request without the scope parameter. That'll default to whatever scopes you configured (you'll need at least one for your authorization to go through).
Did you try replacing the spaces with %20, like so?
https://login.uber.com/oauth/v2/authorize?client_id={{client id}}&response_type=code&scope=profile%20request
They forgot an 's' in the documentation file.
Try scopes=... instead of scope=...
I'm creating a custom module in Drupal, that for part of its functionality must fetch posts from a business page. So for simplicity, I'm using fbapp module as a dependency (drupal.org/project/fbapp), so that I can use it's authentication and request functions (fbapp_app_authenticate() and fbapp_graph_request()) without having to worry about the constant facebook graph updates making my own code obsolete.
I've created a facebook app, so authentication should be app token, using appid and app secret. This seems fine and I'm getting back access_token. However, when I try to read posts from a publicly available page (the clients), I get the response:
"Unsupported get request. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api"
Here's the queries and responses my code produces:
graph.facebook.com/oauth/access_token?client_id=<redacted>&client_secret=<redacted>&grant_type=client_credentials
array(1) {
["access_token"]=>
string(43) "<redacted>|<redacted>"
}
graph.facebook.com/<page_id>/posts?access_token=<redacted>|<redacted>"
string(183) "{"error":{"message":"Unsupported get request. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api","type":"GraphMethodException","code":100}}"
Can anyone verify a correct way to query a Facebook page programmatically, perhaps there's a setting in the page I'm querying that I need to set (although I can't find anything)?
If page restrictions apply, the page's feed can only be retrieved with an user access token as far as I know (because FB needs to evaluate the visibility criteria, and setting your app to the same restrictions doesn't help here):
See
https://developers.facebook.com/docs/graph-api/reference/v2.4/page/feed#readperms
It looks like everything you have done is correct. The response you got can be (i am not sure) because you got your clients pageid wrong.
According to these docs: https://developers.facebook.com/blog/post/2013/04/03/new-apis-for-comment-replies/ and https://developers.facebook.com/docs/reference/api/Comment/, I should be able to GET comments of a post with {object_i}/comments and replies with {comment_id}/commnets.
The former works, but the latter not.
For example: http://graph.facebook.com/10151655724337952/comments, but not http://graph.facebook.com/10151655724337952_10460030/comments.
Object http://graph.facebook.com/10151655724337952_10460030 is fine.
Original post: https://www.facebook.com/photo.php?fbid=10151655724337952&set=a.114456157951.118433.8062627951&type=1.
What am I missing?
The {comment_id}/comments connection needs a valid access token. It's weird (since the parent comment didn't need it) but if you supply an access token you can retrieve the response.
Most likely one more of these calls were to be restricted by access tokens as defined by the documentation. This happens for a few other connections and basically ends up being a contradiction either in the documentation or API response.
(I'll leave this up to Facebook Bug Team to figure out #_#)
You can get replies by adding the comments field to the {object_id}/comments call, as outlined in the documentation. But as the documentation and #phwd points out:
This call requires the same Permissions as those of the Comment object. It will also have a response of the same structure as the top-level /comments call.