我已经部署了一个firebase云函数(http函数),我可以使用postman工具成功访问该函数,但当我尝试从android应用程序通过客户端sdk访问时,总是会出现权限拒绝错误:
带系统。错误:com。谷歌。firebase。功能。FirebaseFunctionsException:权限\u被拒绝
04-19 15:18:00.258 3118-3118/com。美国广播公司。xyz带系统。错误:位于com。谷歌。firebase。功能。FirebaseFunctions 2美元。onResponse(com.google.firebase:firebase函数@16.3.0:273)
在okhttp3。RealCall$AsyncCall。执行(RealCall.java:206)
在okhttp3。内部的NamedRunnable。run(NamedRunnable.java:32)
在java。util。同时发生的线程池执行器。runWorker(ThreadPoolExecutor.java:1112)
在java。util。同时发生的ThreadPoolExecutor$工作者。运行(ThreadPoolExecutor.java:587)
在java。lang.Thread。运行(Thread.java:818)
这是我用来访问函数的代码
private fun saveInstallationId(key: String, userId : String, installationKey : String) : Task<String> {
val data = hashMapOf(
"key" to key,
"installationId" to installationKey,
"userId" to userId
)
return functions
.getHttpsCallable("setInstallationId")
.call(data)
.continueWith { task ->
val result = task.result?.data as String
result
}
我想我丢失了一些头,是否可以使用客户端sdk设置头参数?