Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application does not have permission for this action, Please retry this action in a few minutes #442

Open
Denalda-lab opened this issue Nov 13, 2023 · 0 comments

Comments

@Denalda-lab
Copy link

Which SDK version are you using?

<dependency>
    <groupId>com.facebook.business.sdk</groupId>
    <artifactId>facebook-java-business-sdk</artifactId>
    <version>18.0.2</version>
</dependency>

What's the issue?

Steps/Sample code to reproduce the issue

I want to invite a user to join a business manager account programmatically using Java.
My App and the access token I am using have the right permission to make this action. My app has business_management permission (advanced access) and my user has an administrative role, which means I am able to invite the exact new user to the same business manager via facebook ui.

    new Business.APIRequestCreateBusinessUser("181431399044864",FacebookUtil.createApiContext(request.getAccessToken()))
            .setEmail("test@gmail.com")
            .setRole(BusinessUser.EnumRole.VALUE_EMPLOYEE)
            .execute();

It returns me the error message:

{
"error": {
"message": "Application does not have permission for this action",
"type": "OAuthException",
"code": 10,
"error_data": {
"hash": null
},
"error_subcode": 2859030,
"is_transient": false,
"error_user_title": "This Action Is Not Allowed",
"error_user_msg": "Please retry this action in a few minutes",
"fbtrace_id": "AsErZRmD617WCt9yYFZkUZR"
}
}

Meanwhile during my investigations I have figured out that I can make this action by using an admin system user access token instead of a simple user. But the issue here is that I can not generate an admin system user access token programmatically #438

Expected Results:

  • The user must get a notification email to join the business manager account using a simple user access token.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant