Insufficient Permission [403] error while modifying the Message Label using gmail API in c#

随声附和 提交于 2019-12-05 04:13:45

you need to add the priviliges to the scope variable and then to delete the file storedCredentials (C:\Users\Administrateur.credentials.. )

Elango M

I had similar problems with a console application using a Service Account API key. After adding all the necessary Scopes, as mentioned by Tholle above, the application has to be updated with the necessary permissions in the Google admin console. To do this, make sure you go to Admin console and remove the current app and execute the program again to get a new token with new permissions with the updated scope.

Another way to accomplish the same is to do what Mohamed has mentioned above. That is to remove the JSON file from the "...User\[UserName]\.credetials\[apiCredentialName].json" folder. This will force the app to authenticate and get a new token. Hope this helps some one :-)

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