Messenger error 2018391: Invalid connection parameter
Last verified against Meta for Developers - Messenger Platform error codes
The connection parameter cannot be empty when calling accept call apiWhat error 2018391 means
Code 2018391 means your accept-call request reached Meta without the connection information it needs to set up media: "The connection parameter cannot be empty when calling accept call api." The fix in Meta's table is to "make sure the connection parameter matches the api spec and is not null."
Accepting a Messenger call is not only a yes. Your app must hand over its side of the WebRTC negotiation. In the current accept-call reference that object is named session and carries an sdp string compliant with RFC 4566, while the error-codes table still calls it the "connection parameter." Either way, the error says the object was missing, empty or null.
Typical causes are mechanical. The SDP was generated asynchronously and the request went out before the promise resolved, a serializer dropped a null field, or the request followed an older sample with a different field name. The call itself is still valid at this point, and the person's phone may still be ringing. You have about 60 seconds from the connect webhook to accept, so a fast corrected retry can still succeed.
What it looks like
{
"error": {
"message": "(#2018391) The connection parameter cannot be empty when calling accept call api",
"type": "OAuthException",
"code": 2018391,
"fbtrace_id": "BLBz/WZt8dN"
}
}Why it happens
- Sending the accept request before the local SDP has been generated.
- Missing or null session object after JSON serialization.
- Using a field name from an older sample that the current API does not read.
- Media setup errors in the WebRTC stack that leave the SDP empty.
How to fix Messenger error 2018391
- 1Await SDP generation completely before sending action accept.
- 2Log the outgoing body and confirm the session object contains an sdp string.
- 3Match the field names to the current accept-call reference.
- 4Retry once quickly with a corrected body while the call is still ringing.
- 5If SDP generation fails, reject the call cleanly rather than sending an empty accept.
How to stop it recurring
Validate the accept payload in code before sending: non-empty session, non-empty sdp, correct types. Measure the time from the connect webhook to your accept request so you know how much of the 60-second window your media setup consumes.
Official reference: Meta for Developers - Messenger Platform error codes. See all Messenger error codes or the Messenger limits and quotas.
Related codes
Error 2018391 - quick answers
What does Messenger error 2018391 mean?
Code 2018391 means your accept-call request reached Meta without the connection information it needs to set up media: "The connection parameter cannot be empty when calling accept call api." The fix in Meta's table is to "make sure the connection parameter matches the api spec and is not null." Accepting a Messenger call is not only a yes. Your app must hand over its side of the WebRTC negotiation.
How do I fix Messenger error 2018391?
1. Await SDP generation completely before sending action accept. 2. Log the outgoing body and confirm the session object contains an sdp string. 3. Match the field names to the current accept-call reference. 4. Retry once quickly with a corrected body while the call is still ringing. 5. If SDP generation fails, reject the call cleanly rather than sending an empty accept.
Stop debugging Messenger by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.