Getting "PermissionDenied" error while trying to use Google Translator V3 - Advanced Translation

I've tried to use the Google Translator V3 for the first time and keep getting this message.

Status(StatusCode="PermissionDenied", Detail="Cloud IAM permission 'cloudtranslate.generalModels.predict' denied. "

The thing is, if I make a request in Visual Studio Code using the same .json credential and glossary file, it goes through just fine.

Has anyone experienced a similar issue?

emoji