Upload Intent function Dialogflow V2

前端 未结 3 444
心在旅途
心在旅途 2021-01-19 02:53

I am trying to develop an API to upload the intent to Dialogflow V2. I have tried below snippet, which it is not working however if trying to communicate with <

相关标签:
3条回答
  • 2021-01-19 03:28

    You can use JWT(JSON Web Tokens) for authenticating with service accounts like in this example

     const serviceAccount = { };    // JSON key contents {"type": "service_account",...
    
     const serviceAccountAuth = new google.auth.JWT({
     email: serviceAccount.client_email,
     key: serviceAccount.private_key,
     scopes: 'https://www.googleapis.com/auth/calendar'
    });
    

    For more OAuth2.0 scopes for Google APIs you can see the full list here.

    0 讨论(0)
  • 2021-01-19 03:37

    I encountered the same error. I corrected it by deleting the current service account and creating a new one and selected the "owner" option for the role.

    0 讨论(0)
  • 2021-01-19 03:38

    The associated service-account has to have the role "Dialogflow API Admin" to be able to create intents and entities.

    0 讨论(0)
提交回复
热议问题