When I call /2/dm_conversations/:dm_conversation_id/messages API, the below response is returned once every few times.
{
“title”: “Forbidden”,
“detail”: “This operation is not permitted.”,
“type”: “about:blank”,
“status”: 403
}
- What does this message mean ?
- How can I prevent this error from occurring ?
Hi @MiyattiTadashi ,
I feel this error is because you are not authorized to access this endpoint, or you have not indicated it explicitly.
First, do you have the following permissions enabled in your developer portal? If you have not done so, please enable this option and regenerate the token if necessary.
Or if you are using a token issued by OAuth 2.0 PKCE, the scope you are using may be different. You need following scopes for this endpoint with OAuth 2.0 PKCE.
tweet.read
users.read
dm.read
dm.write
1 Like