Partial Outageshare-external
Able to get persona but not sending messages with that
1

Hi, I'm experiencing a bug might be from messenger that I'm able to request for the data of a persona_id. However, I cannot use this persona_id to send message to users

For example, here is my code in typescript

export async function messagesAPI(user: User, data: SendMessage, persona_id: string | undefined = undefined): Promise<boolean>{
    console.log(persona_id);
    console.log(await getPersona(persona_id as string));
    const url: string = config.fb.api + `/${pageConfig.PAGE_ID}/messages?access_token=${pageConfig.PAGE_ACCESS_TOKEN}`;
    data.recipient = {id: user.userId};
    data.messaging_type = "MESSAGE_TAG";
    data.tag = "ACCOUNT_UPDATE";
    data.persona_id = persona_id ;
    data.notification_type = (await user.getPrivacy()).notificationType;
    axios.post(url, data).catch((e) => {

        console.error("Message API Error:\n", e.response.data);
        return false;
    });
    return true;
}

And the corresponding output is

1054918129447977
{
  name: 'Finch',
  profile_picture_url: 'https://scontent.fsin15-2.fna.fbcdn.net/v/t39.30808-6/465843613_534654982856316_3531934674519798661_n.png?_nc_cat=104&ccb=1-7&_nc_sid=186f7b&_nc_ohc=mUmbYnTCyI4Q7kNvgFD2JY0&_nc_zt=23&_nc_ht=scontent.fsin15-2.fna&edm=ACzW3ggEAAAA&_nc_gid=AlHx11Iwh9se_SiZ5DgkJzD&oh=00_AYCzyvjOQ6ygubttsYpcK-pCD9Xt5c_D7sRdRNT_IC74LQ&oe=67384961',
  id: '1054918129447977'
}
Message API Error:
 {
  error: {
    message: '(#100) Invalid or inactive persona information',
    type: 'OAuthException',
    code: 100,
    error_subcode: 2018225,
    fbtrace_id: 'A-8WoP7fqGztqu8Et3mM6rZ'
  }
}

Let me know if anyone solves this issue.

Phong
Asked about a week ago