我有一个应用,该应用通过 twilio 使用授权。而且我想使用 firebase 代替 twilio ,但是代码没有太大变化。
身份验证现在可以用作:
android->服务器-> twilio服务器(已发送短信)
服务器向twilio服务器发送一个http请求,有点像这样
curl -X POST https://api.twilio.com/2010-04-01/Accounts/ACaa3cd370b...a5312c404ce/Messages.json \
--data-urlencode "Body=This is the ship that made the Kessel Run in fourteen parsecs?" \
--data-urlencode "From=+1938...6285" \
--data-urlencode "To=+99670...4137" \
-u ACaa3cd370b...a5312c404ce:d5027e7d53b6...d9ac4ab0e89
我想做的是改为将http请求更改为firebase。但实际上我不知道是否可能。我没有太多经验。
Firebase与云服务器配合使用,我的意思是请求直接发送到Firebase服务器,这意味着我可以与android studio建立连接,并在应用程序内部检查验证。
我要死胡同了吗,还是有解决办法?
找不到任何内容,“ firebase sms curl send”仅显示推送通知结果
还有一个example
curl -X POST \
'https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?key=api_key' \
-H 'content-type: application/json' \
-d '{
"phoneNumber": "phone_number_to_verify",
"recaptchaToken": "generated_recaptcha_token"
}'
但是我没有收到任何短信,也没有关于使用情况的信息,或者我措辞不太正确,请咨询
答案 0 :(得分:0)
那是多么的可悲,但是没有解决方案。您无法通过firebase发送短信,只能使用其android-studio-firebase-hardcode-architecture。
找到一个主题“ Can I use Firebase for sending SMS to users without using Twilio?”,答案为否