How to Archive iMessages via API with User Authorization Workflow?

I’m working on a solution to archive iMessages by using an API or similar mechanism. Here’s the desired workflow:

  1. The user provides their phone number to initiate the archiving process.
  2. They receive a text message with a URL link.
  3. Clicking on the link authorizes the archiving of their iMessages.
  4. Once authorized, their text messages are archived.

So far, I’ve researched third-party services and APIs but haven’t found any that offer this capability directly for iMessages.

Questions:

Are there any APIs or frameworks (Apple or third-party) that support accessing and archiving iMessages programmatically?

How to Archive iMessages via API with User Authorization Workflow?
 
 
Q