What is the provider_id and how do I obtain it?

You can run "occ twofactorauth:state <user>" to get all enabled and disabled providers of a user displayed.