Search code examples
dialogflow-esaccess-token

How I can update entity dialogflow since Nodejs?


There are someone who know how update a dialogflow entity with code.

I have been trying with the [API Rest of Dialogflow][1] but I dont know how get a Access Token by code.

I am trying update the entity with the Api Rest by Postman. I have generated the Access Token by Google Cloud SDK Shell but it show me this 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 configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. "

...

Is this the best way? Am I in the correct way? [1]: https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.agent.entityTypes.entities/batchUpdate


Solution

  • yes, you are in the correct way.

    Please check the credentials once again, and make sure the path to Json is set.

    If you are trying to do in postman, you have use bearer token for authorization.

    generate bearer token by going to cmd and type :gcloud auth application-default print-access-token