i am trying to build image uploader in vue js and i want it to be resumable upload and i am sending the request directly to cloud storage server from browser (not using php for example as a middle-ware to send upload request )
but the docs says i must have access token to get session url which i will use later to upload image , How To get this access token using JavaScript , google cloud doesn't have library for javascript but in node js which i can't use for browser usage
POST https://www.googleapis.com/upload/storage/v1/b/myBucket/o?uploadType=resumable HTTP/1.1 Authorization: Bearer [YOUR_AUTH_TOKEN]
from this page : https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload