mautrix / facebook

A Matrix-Facebook Messenger puppeting bridge
https://matrix.to/#/#facebook:maunium.net
GNU Affero General Public License v3.0
389 stars 64 forks source link

[Question] Is there a way to login and configure the bridge programmatically without sending message to bot? #241

Closed dulguun0225 closed 2 years ago

dulguun0225 commented 2 years ago

Is there a way to login and configure the bridge programmatically without sending login "username" message to the bot?

I'm trying to make a generic webhook based puppeting bridge that can control other bridges. Trying to control the facebook bridge by sending message to facebook-bridge-bot from my bridge's code and tracking login step state seems like a very unreliable choice for me.

tulir commented 2 years ago

https://github.com/mautrix/facebook/blob/v0.4.0/mautrix_facebook/example-config.yaml#L52-L64 + https://github.com/mautrix/facebook/blob/v0.4.0/mautrix_facebook/web/public.py#L70-L79

dulguun0225 commented 2 years ago

@tulir thank you. That was really helpful. I have another question.

Do most bridges have same api for management? Or does it totally depend on how authenticatin process works on each platform e.g facebook, whatsapp, instagram etc.

sumnerevans commented 2 years ago

All mautrix bridges have some sort of provisioning API, but it's not standard across bridges because the auth processes are too different.