Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
DialglowV2:使用java生成访问tocken_Java_Authentication_Dialogflow Es_Google Cloud Sdk - Fatal编程技术网

DialglowV2:使用java生成访问tocken

DialglowV2:使用java生成访问tocken,java,authentication,dialogflow-es,google-cloud-sdk,Java,Authentication,Dialogflow Es,Google Cloud Sdk,文档说明: 1.安装并初始化Google Cloud SDK 2.在本地环境中激活服务帐户: gcloud auth activate-service-account --key-file=<service-account-key-file.json> gcloud身份验证激活服务帐户--密钥文件= 将环境变量GOOGLE_APPLICATION_CREDENTIALS设置为包含服务帐户密钥的JSON文件的文件路径。 为了在以后的shell会话中使用,应该将此设置保存在初始化文件

文档说明:
1.安装并初始化Google Cloud SDK
2.在本地环境中激活服务帐户:

gcloud auth activate-service-account --key-file=<service-account-key-file.json>
gcloud身份验证激活服务帐户--密钥文件=
  • 将环境变量GOOGLE_APPLICATION_CREDENTIALS设置为包含服务帐户密钥的JSON文件的文件路径。
  • 为了在以后的shell会话中使用,应该将此设置保存在初始化文件或系统设置中,例如.bashrc文件中
  • 添加标题:
    授权:承载$(gcloud auth print access token)


    有没有办法在没有云SDK和环境变量的情况下生成新的访问令牌?我想使用Java编程语言

  • 这是关于在不同语言中使用Dialogflow V2 API的文档。单击JAVA中示例代码的JAVA选项卡,并展开“开始之前”中的这些部分以准备环境