user575219
user575219

Reputation: 2442

error OAuthException "message": "mailbox requires the read_mailbox extended permission."

I am getting this error while trying to access Facebook Graph api mailbox

https://graph.facebook.com/me/inbox?access_token=<access_token> 


"error": {
      "type": "OAuthException",
      "message": "mailbox requires the read_mailbox extended permission."

The access token is valid.. But any hints on the permissions and where I am going wrong.. First, on logging in to Fb, it gives me a code and then access_token

Thanks for your help.

Upvotes: 2

Views: 18599

Answers (4)

Sayf-Eddine
Sayf-Eddine

Reputation: 593

Hello here hope you are doing well,

Since the read_mailbox has been deprecated and removed, the Facebook Graph Api still return errors about it.

Instagram Messaging Documentation

If you try to get all messages for a page or an instagram account you are at the right place !! 😁

For this topic i found a solution according to video of Get started with the Messenger API for Instagram

So i've got the same error and i found out how to fix this,

Basically the error is caused because you are trying to generate a "User Token" instead of a "Page Access Token"

First solution:

You have to use a "Page Access Token" from the drop down instead of "User token".

Second solution:

(Or for the one that couldn't get the "Page Access Token" from the drop down you must add business_management to your permissions to let the dropdown be choosed.)

Step 1: Add business_management to the permissions

Step 2: Click on the dropdown and select "Page Access Token"

Step 3: Generate Access Token

And it work !

I hope it will help ! :D

Upvotes: 0

pxeba
pxeba

Reputation: 1806

At this time it is not possible to use the instagram API without an application authorization. The tutorials that teach how to use it through a token generated by the graph api do not work. For the application, you will first need to send some documents from your company, wait for validation, and then send advanced resource requests

Upvotes: 0

Brane
Brane

Reputation: 3339

This is outdated, with the latest release(current version 2.6), you can't access private messages.

Upvotes: 3

Brian Roach
Brian Roach

Reputation: 76908

You need to grant your application the read_mailbox permission.

https://developers.facebook.com/docs/authentication/permissions/

Information on how you do that can be found here:

https://developers.facebook.com/docs/authentication/

Upvotes: 2

Related Questions