https://api.uber.com/v1/partners/me returning application_not_allowed - uber-api

Hi we are trying to fetch profile info by calling https://api.uber.com/v1/partners/me and passing the access token. But evrytime we are getting the following response
{
"code": "application_not_allowed",
"message": "Application not allowed."
}
P.S. We are able to fetch the authorization code and access token in subsequent api calls before calling the final api ( https://api.uber.com/v1/partners/me)

Related

An accessToken issue using the Graph API

I'm trying to make a GET request from the Facebook Graph API, graph.facebook.com (using Postman, a Chrome application) to get all events containing the key word as below:
graph.facebook.com/v2.8/search?pretty=0&q=<MY_CITY>&type=event&accessToken=<MY_APP_ACCESS_TOKEN>
I'm having this response from Facebook:
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104,
"fbtrace_id": "B5KWVqr7ajK"
}
}
I've rechecked my app_access_Token, and it's fine and works for other requests. How can I fix this problem?
https://developers.facebook.com/docs/graph-api/using-graph-api/#search:
All Graph API search queries require an access token included in the request. You need a user access token to execute a search.

Can We Access Facebook Api Using Postman client

I want to access my full details using facebook api . I am using postman client for this and hit api as
URL : graph.facebook.com/v2.2/me
METHOD : GET
HEADER PARAMETER :
AccessToken : djbjd
AppID : dsdmds
AppSecret :sdkkd
Now I get response :
STATUS : 400 Bad Request and Response
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "AQt0krgrd2U"
}
}
Can anyone tell me how I can hit facebook api using postman client .
You only need one GET parameter for this, the access_token parameter. It must be a valid User Token or Page Token.
You can also just try this in the browser directly: https://graph.facebook.com/me?access_token=xxx
I've been using Bearer Token to input the access token on Postman Client. The cool thing about it is you can add it to the folder and have every query inside the folder inherit it from the parent.
This lets me focus on the call and use each folder as an environment for calls related to the same object Page, App, Messenger and other tests

Facebook SDK AppRequests Error: OAuthException

I want to read the user's apprequest-id. I've already finish the function below:
get server token:
url = "https://graph.facebook.com/oauth/access_token?client_id=#{app_id}&client_secret=#{secret_key}&grant_type=client_credentials"
then, i built the function that sending user_token to server as {client_access_token}
So, I call this function to get AppRequest as json
url = "https://graph.facebook.com/v2.3/#{fb_id}/apprequests/?input_token=#{client_access_token}&access_token=#{server_access_token}"
And i got this error:
{
"error": {
"message": "(#15) Requires session when calling from a desktop app",
"type": "OAuthException",
"code": 15
}
}
At first, I think that there are something wrong with the URL calling or access token, but I've already test another graph api such as "/me/friends" and "/me/?fields=installed" with the same input_token and access_token. And, it works normally. Please help.
This problem has been solve by using {client_access_token} as access_token :)
url = "https://graph.facebook.com/v2.3/#{fb_id}/apprequests/?access_token=#{client_access_token}"

Search for places with an App Access Token suddenly stopped working

i am calling the graph API with an App Access token (grant_type=client_credentials) to search for places on facebook. Quering for
https://graph.facebook.com/search?type=place&center=50.785361,6.0334127
Used return the search result reliably but suddenly stopped working with the following error:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1
}
}
I have tested the call on the Graph API Explorer. With my facebook user's access token the request still returns the desired data. Other requests with this app access token still work, so the token is good.
Any ideas?

How to handle OAuthAccessTokenException in facebook api searches

I'm using Facebook API for searching. For example if I want to search for 'Conti' i get thsi url: https://graph.facebook.com/search?q=%22Conti%22&type=post
In this particular case, and others, instead of getting the list of results, I get this error:
{
"error": {
"type": "OAuthAccessTokenException",
"message": "An access token is required to request this resource."
}
}
why is this? should i get a token in order to the get the results?
UPDATE
Do I need to register an app?
You need to get the access token first, have a look at this tutorial:
Facebook Graph API — getting access tokens