"status code 403" Error while creating file using Mule 4 google drive connector - mulesoft

I have to upload images to google drive through mule integration. I'm facing trouble with <google-drive:file-content> connector. Can someone help me or direct me a tutorial relates to it?
This is the error message while I tried to connect to the google drive
Message : Request returned status code 403
Element : imageuploaderFlow/processors/4 #
imageuploader:imageuploader.xml:39 (Create media file)
Element DSL : <google-drive:create-media-file doc:name="Create media file" doc:id="hhhhhjhj" config-ref="Google_Drive_Connector_Config" contentType="application/octet-stream">
<google-drive:file-content><![CDATA[
#[payload.parts.image.content write "application/octet-stream"]
]]></google-drive:file-content>
</google-drive:create-media-file>
Error type : GOOGLE-DRIVE:CLIENT_ERROR
FlowStack : at imageuploaderFlow(imageuploaderFlow/processors/4 # imageuploader:imageuploader.xml:39 (Create media file))
Google Drive Connector Config
scopes: https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file
connector xml snippet
<google-drive:create-media-file doc:name="Create media file" doc:id="ac59e7fe-e615-fggh-9473-2we5cd73ecb7" config-ref="Google_Drive_Connector_Config" contentType="application/octet-stream">
<google-drive:file-content ><![CDATA[#[payload.parts.image.content write "application/octet-stream"]]]></google-drive:file-content>
</google-drive:create-media-file>
The version of the Google Drive connector is 1.0.1

Ensure that you have Enabled the Google Drive API in your project. Not enabling this also raises a 403 error. Also, mostly, Google API sends pretty clear message when you do something wrong. You can access the detailed HTTP response using error.errorMessage.payload and headers using error.errorMessage.attributes.headers

Related

ReactS3Client library 403 forbidden error on post to S3 bucket

I am using the ReactS3Client and I am having issues with uploading to a bucket. I have all the config files ready. I am using a 3rd party library that allows a user to upload media to a designated cloud server, that being S3. Everything works good on iOS side for the configuration and I am able to upload accordingly. For that, I am using AmplifyCLI.
The error I am getting is: POST BUCKETURL 403 (Forbidden)
On the S3 side, I configured the following -- S3 bucket policy config
I know the error stems from the S3 CORS policy. Ive tried making the bucket public and editing the policy to allow all sorts of requests, but I'm still receiving the 403 forbidden error.
Any help would be really appreciated.

Not able to connect to GCP mysql database using API KEY , Error : Project specified in the request is invalid

I am trying to run my application connecting to mysql database in google cloud. But got an exception:
The Application Default Credentials are not available. They are
available if running on Google App Engine, Google Compute Engine, or
Google Cloud Shell. Otherwise, the environment variable
GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file
defining the credentials. See
https://developers.google.com/accounts/docs/application-default-credentials
for more information.
I went to the page and downloaded the json file.Also set up an env variable to the file. Now I have below error:
400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global",
"message" : "Project specified in the request is invalid.", "reason" :
"errorInvalidProject" } ], "message" : "Project specified in the
request is invalid." }
I believe the project id is correct in the json file and not sure what went wrong.
Let me know if you have any questions. Look forward to your reply.
Thanks,
Di
Expected:
My local application should be able to connect to database server in google cloud.
Actual:
get an error saying Project specified in the request is invalid.
UserProjectInvalid The user project specified in the request is invalid, either because it is a malformed project id or because it refers to a non-existent project.
I believe the project id should be correct and it is in the json file I downloaded. I have not modified it.

HTTP Error 500 when upload file to Google Drive via API V3

I have a production app that running almost one year to regularly upload file from Google App Engine (python) to Google Drive using Google Drive API v3.
but today I received lots of error HTTP Error 500.
here's my app engine log:
12:44:44.296 Refreshing access_token
12:44:44.985 An error occurred: <HttpError 500 when requesting https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&alt=json returned "Internal Error">
12:44:45.054 URL being requested: POST https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&alt=json (/base/data/home/apps/s~xxx/1.zzz/lib/python2.7/site-packages/googleapiclient/discovery.py:863)
any clue how to fix this error?
is the problem on my side or on Google Drive API side?
any help appreciated. thank you.
the problem in this error is on Google Drive side. i had the same error . but when i reduce my file size , the error does not appear again.

Google Cloud Messaging Returns 'to' on localhost

I am trying to send out a push notification through Google cloud messaging and using this as a guide
https://developers.google.com/web/fundamentals/getting-started/push-notifications/?hl=en
I get the endpoint from chrome but when I try to do a CURL call to the endpoint id (using my project number in the manifest file, and my api key), I don't get a meaningful message back. Not even a error.
All I get is 'to' as output. I am using CURL on Windows so I don't know if there is any additional info in the headers (is there?).
Has anyone any clue what 'to' is, and what can I do to fix this.
I am running this test on my localhost on an apache server.
Thanks

Error Uploading image to google cloud storage from Google app engine php app

I am trying to upload images to Google cloud storage using CKeditor4.3.3 image2 plugin from google engine app (php).
POst method return 303 status.
GET returns:
Request URL:http://temporary-blobstore-error.appspot.com/
Request Method:GET
Status Code:500 Internal Server Error
Request Headersview source
I get the following error displayed fromhttp://temporary-blobstore-error.appspot.com/:
Error: Server Error
The server encountered an error and could not complete your request.
Please retry your last submission.
If the problem persists, please contact the person responsible for the application you're using, or, if you are that person, report your problem and mention this error message and the query that caused it.
Following is the Request URL:
[http://v01.mysite.appspot.com/_ah/upload/?aa=ask&cat=2/AMmfu6aYRdoHF3NpG27hJRWyx-RH_Vo5r6NhzqyIK-3YRw7I3OHv_zq6SUYElQKg3phbtFu6GIG_MnltZjS03xNPSDKfA-dmsabvdvdmavdmavmvamdsvmdVMDVAMVmadva-e_rmabsmdvdmsdbmsdbmabdmasbdmasbdmsmdYR2MuM7rBb6dEttPzPYVylmw9/ALBNUaYAAAAAUy-nio2CLZdkumm87rKdUq9oOz1hVJgN/&CKEditor=content&CKEditorFuncNum=0&langCode=en][1]

Resources