i am using gcp service account but when calling dialogue flow api its giving error :

六月ゝ 毕业季﹏ 提交于 2019-12-13 00:55:38

问题


here is error:

Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the dialogflow.googleapis.com. We recommend that most server applications use service accounts instead. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.


回答1:


Many of the Client Libraries pull from the Application Default Credentials, a summary of how they're checked is provided on that link. Essentially it will check environmental variables for a path and pull credentials from that location. This error message means you're using a User account, and not a service account.

Most commonly you logged in once using gcloud auth login, and even though you provided your service account it's still pulling from the Application Default location.

As you did, the method to associate a specific service account is gcloud auth activate-service-account --key-file <path>

Alternatively to use the true application default you can use gcloud auth application-default login



来源:https://stackoverflow.com/questions/53406673/i-am-using-gcp-service-account-but-when-calling-dialogue-flow-api-its-giving-err

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!