title: HttpError 403 with CONSUMER_INVALID as the reason when deploying a machine learning model to Google cloud's AI platform
body: <p>I am following the tutorial here (<a href="https://cloud.google.com/ai-platform/training/docs/training-jobs#python_1" rel="nofollow noreferrer">https://cloud.google.com/ai-platform/training/docs/training-jobs#python_1</a>) and using Python to deploy a machine learning model to Google cloud for training. However, I got HttpError 403: &quot;Permission denied on resource project my_project.&quot; The reason for the error is &quot;CONSUMER_INVALID.&quot; Specifically, the returned metadata shows that the consumer is &quot;projects/my_project,&quot; and the service is &quot;ml.googleapis.com&quot;.</p>
  <p>I went to the AI platform and my project is indeed there. The API I am requesting to use is enabled for the project and the environment variable GOOGLE_APPLICATION_CREDENTIALS has been set correctly. I am wondering how to fix the problem. Thanks!</p>