I'm using Facebook graph API v2.9, and in login use scope:
email,ads_management,ads_read,business_management,pages_show_list,user_managed_groups,user_events,read_insights
I created an application on developers.facebook.com.br and associated the Marketing API, where I have only myself as an administrator.
When I log in to the application that I am developing with my facebook account I succeed, however if someone else tries to use my tool with this person's facebook login, when trying to call api
https://graph.facebook.com/v3.0/me/adaccounts?fields=name,account_id,account_status,id&access_token={TOKEN_LOGIN}
{
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "DAoQR9tEODK"
}
}
gives the following error:
My question is if someone else uses this API, will I have to add it as an application manager, or if is there another fetch to get all adaccount_id without that person being a member of my application?
Related
When trying this endpoint: POST /v13.0/<OFFLINE_EVENT_SET_ID>/events , i got the following error:
{ "error": { "message": "(#270) This Ads API request is not allowed for apps with development access level (Development access is by default for all apps, please request for upgrade). Make sure that the access token belongs to a user that is both admin of the app and admin of the ad account", "type": "OAuthException", "code": 270, "fbtrace_id": "xxxxxxx" } }
My app is in Live Mode. And has been approved for ads_management, business_management with Advanced Access.
I hope you guys can help me with this issue.
Thank you a lot.
I'm trying to list the Ads for a Facebook Page using the Graph API /{page-id}/ads_posts endpoint, but I get a permissions when I try to.
Using the Graph API Explorer, I generate an Page Access Token with those permissions: email, read_insights, manages_pages, pages_show_list, ads_read, business_management, instagram_basic, instagram_manage_insights and public_profile.
I'm an admin on the Page itself, the attached Business Manager and on the corresponding Ad Account.
Every time I try to call the /{page-id}/ads_posts, I receive
{
"error": {
"message": "(#200) Not enough permission to call this endpoint",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "XXXXX"
}
}
I can't find any help on the Facebook documentation or Google, given that the error isn't really meaningful (in some cases, I get a message saying that a specific permissions is missing, but not here). Anyone can help ?
EDIT: I tried to add the ads_management permission too, without success.
You need to add those pages to your app that is in development mode (https://www.facebook.com/settings?tab=business_tools).
We have a company-owned web application that should post to our company-owned facebook page.
should be a server-to-server call
the user in our webapplication who makes the post in the webapplication gui, should ideally not have to be a facebook admin for the facebook page.
We have a facebook App that is added to a testpage on facebook, and when I do this API call:
https://graph.facebook.com/PAGE-ID/feed?message=MESSAGE-CONTENT&access_token=APP-ID|APP-SECRET
..the answer I get back is:
{
"error": {
"message": "(#200) The user hasn't authorized the application to perform this action",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "TRACE-ID"
}
}
It seems like I need the publish_pages right, and this right require an App-review (unless users are known and assigned roles in the app), but it says in the review info from facebook, that automatically publishing is not allowed for this right.
We can save a token in database and reuse when posting to Facebook Graph API.
Is this impossible without a facebook user doing a Facebook login in our webapplication?
Should we instead get a long-lived user token from a facebook-page-administrator, and then reuse this when posting, and re-login to facebook client side, before token expire?
I want automatically collect data from fb ad account with marketing api.
There is an facebook app, which has access to advertising account (with access level = development). App has product 'Marketing API'.
Got access_token (app_id|token) like this:
GET https://graph.facebook.com/oauth/access_token?client_id=<app_id>&client_secret=<secret>7&grant_type=client_credentials
When i try insights method
GET https://graph.facebook.com/v2.8/act_<ad_account_id>/insights/?access_token=<access_token>
i got an error
"message": "Unsupported get request.", "type": "GraphMethodException", "code": 100
Try to generate not app token, but user token of someone who has access to that ad account.
Our organization uses SAML for SSO into Google Apps. In order to use SSO we must manage the change password functionality through APIs. Since the Provisioning API has been deprecated in favor of the Admin SDK Directory API, I am developing against this API.
The flow I am developing is that the end user will login using Google OAuth2 into my application. Then, using the users access token I am attempting to call the https://www.googleapis.com/admin/directory/v1/users/ API to put a new password, but I get an error 403 "Not Authorized to access this resource/api".
My question is, what privilege is required for the user to be able to update their own password? When calling this API with GET I am able to retrieve my user information successfully, but trying to put a new password (or any other field for that matter) fails.
Here is an example of my request and response:
Request:
PUT https://www.googleapis.com/admin/directory/v1/users/user%40domain.org?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.AHES6ZT_7onp48edpClD72X-*************************
X-JavaScript-User-Agent: Google APIs Explorer
{
"password": "wlKsf.##2af"
}
Response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
}
],
"code": 403,
"message": "Not Authorized to access this resource/api"
}
}
Only super admins, delegated admins and resellers can access the Admin SDK Directory API.
I suggest creating a delegated admin that only has access to update users via the API and then having your web application utilize an OAuth token created for this delegated admin.