Hi all,
I want to take a pic and send it GoogleCloudVision so get the GoogleCloudVisionOCR from Forge and use.
But when I set API restrictions 'Android apps' and set API restrict key, an Error message as attached pic displayed and Googe API kicks request out.
When I set none restriction, it works well.
How do I deal with this situation?
Thanks in advance.
Hi Tomio, I agree with Stefan the server hosting outsystems is making these requests not the app. Here are 2 restrictions I think you could try and apply1 - Restrict Ip address of your front end server. I am not 100% sure if using the domains will work as Stefan suggested, but try using the websites options. I would try the ip address using the front end server ip (if using outsystems cloud)2 - Restrict the APIs that can be used with that keyCloud Vision APIs rather than other APIs (like Google Maps) etc that way you are minimising the exposure of that key.
Thanks André for detailed reply and suggests.
As I wrote in reply to Stefan, I restrict by IP and my app works as planned.
Then I think "If IP Address of Outsystems frontend server change?"
So I'm thinking the fundamental solution would be modify the GCVOCR Runtime to send App identifier or something like that Google API needs.
Anyway, the problem solved for the time being. Thanks for help and sorry for my poor English.
Ip address on the front end server(s), if using OutSystems cloud, is static
Thanks André. Your info eases me. Sorry for the late reply.
And my boss maintained the GCVOCR library add a magic to send App info and this and that.
Again many many thanks to your assist and concern.
Sincerely.
The Google Connector you are using is running on the OutSystems Frontend Server. Your mobile app is not the origin of the request, thus not the requesting application. Your app calls your frontend server that calls Google API. You can restrict to http origins instead referring to your OutSystems environment URLs.
Thank you Stefan, I understand how it doesn't work.
I can't find out URLs so restrict by IP and it works.
Thanks for the answer. You've been very helpful.