【Python】問題解決:403 IAM permission 'dialogflow.sessions.detectIntent' on 'projects/xxxxxxx/agent' denied.

前言

這個是當我在研究 dialogflow api 所發生的問題,
簡單來說就是當 python 串接 dialogflow api 執行時會跳出以下的 error。

403 IAM permission 'dialogflow.sessions.detectIntent' on 'projects/xxxxxxx/agent' denied. 

以下提供我的解決方法。

解決方法

簡單來說是金鑰的檔案出了問題,建議將金鑰產生的步驟重新操作。

以我的個人經驗來說:

問題是出在 google cloud platfrom 那邊使用了不正確的使用者產生了金鑰,
導致產生出的 json 結果是有問題的。

金鑰重新產生的步驟

關於金鑰重新產生的步驟,可以參考我的另外一篇文:

https://wongwongnotes-github-io.pages.dev/python/python-dialogflow-api/

Reference

https://www.timelog.to/a181507263

Licensed under CC BY-NC-SA 4.0