Connecting to the Google Cloud Vision API

Connecting to the Google Cloud Vision API

Hi,

I'm trying to integrate the google cloud vision API into my project. I want the user to take a photo of some text, to send that image to the Google cloud vision API to use OCR to extract a number from this image and then return this number and fill a field on my form.

I have got two issues I need help with.

Firstly trying to format a postURL using the JSON request format as described here: https://cloud.google.com/vision/docs/request
I've tried sending it as a string or using the instructions in the last comment here: https://help.zoho.com/portal/community/topic/can-posturl-be-used-to-make-a-post-that-contains-a-json-body

Secondly, assuming i can get the above to work do I reference the image taken by the user. I would either need a publicly accessible url, be able to upload the image to google cloud storage or be able to send the image as a base64 encoded image string.

I've searched here and google and havent found anything, I may be asking for the impossible but can anyone help or suggest another way of getting OCR integrated with my project.

Many thanks,

Josh