I tried to call predict request on one of my deployed models using the HTTP API method from postman and I got this as a response:
{ "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "status": "UNAUTHENTICATED" } }
I realised that we need authentication, So I tried using the Firebase Cloud Functions to make the same HTTP call and I still get the same response as above. I did a bit of digging and came across all the services that can used with cloud functions and I see ML Engine in it.
I added the Cloud Functions service account as ML Engine Owner in the permissions tab of my model, expecting it to add auth required for the API calls, which still did not work.
I don't want to use the cli or python-client-library for the same, the intention is to make this work server-less.
Anybody who can help me out on why this is happening or how else I could do a HTTP call to the predict request?
Thanks.