The error occurs while trying to upload a photo to Google Photos.
The remote server returned an error: (400) Bad Request.
https://picasaweb.google.com/data/feed/api/user/default/albumid/xxx
The Picasa API is deprecated. See https://developers.google.com/picasa-web/ for more details and the migration guide.
at System.Net.HttpWebRequest.GetResponse()
at ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)
I am currently rewriting our uploader to fix this.
Rewrite done, please install a dev build.
Also hope for video support of new Google Photos API
Following this - I have this issue ;)
PR open here #3890
Also hope for video support of new Google Photos API
Video is supported, tested mp4.
@matthewburnett Any idea what the turnaround time would be to complete a rewrite of the uploader to make uploading to Google Photos operational again?
@jdcollier1968 It should be done in the next few days, then you can grab a dev build with the operational patch, as a release with this rewrite will probably be a long time from now.
too bad, links generated using this api are short, I like them.
currently I am uploading images manually to Google Photos, links are too long.
can't wait to see how new api will perform.
This is how links will look https://photos.app.goo.gl/JbEtgfronvdKsdPW9
This is how links will look https://photos.app.goo.gl/JbEtgfronvdKsdPW9
Oh no, no more hotlinking!
too bad, I liked this service, looks like it is time for another service.
Try Google Cloud Storage https://getsharex.com/docs/google-cloud-storage
It is very good alternative with cheap prices, but to be honest, I wanted something free, because I store images for use on forums or services that does not proved image uploading feature, I was using imgur but it is blocked in some websites, and as you know forums only allow hotlinked images, I cannot embed images there.
beside imgur reduces image quality, while Google photos never touches the image.
Message:
The remote server returned an error: (400) Bad Request.
Request URL:
https://www.googleapis.com/oauth2/v4/token
Response:
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)
Refresh access token failed.
Not sure if this is a separate issue. But ShareX is still failing to upload to Google Photos. I've re-authenticated but problem persists. Seems a bit different from the error code in the OP.
Do we know when this will be working again, quite annoying that i cant upload to gphotos. i see there are active edits being made just waiting for the release to be pushed out.
+1
You guys not gonna like that new API. It not gives direct link to image. Requires creating album for each upload to make it shareable. Which also requires 4 different requests according to @matthewburnett. So it is nothing like Picasa API.
Wait so you can't just have it upload to a specific public album? You're kidding... err does anyone know of any good free alternatives that support direct links?
The differences are:
As long as you understand the above, the uploader will be fine. It’s not a bad uploader, just more unavoidable limitations because Google wants stricter security. Alternatives would be Google Drive or Google Cloud Storage if you like to stay in the ecosystem.
Since Google Cloud Storage is paid service, I can understand why it allow hotlinking, but Google Drive does not allow hotlinking, I know that hotlinking from Google Drive was possible, but now cannot find any way to use it, do you think it is possible?
@Abu3safeer @matthewburnett maybe after getting album id send a get request to it and fetch the hotlink from HTML. This is a really dirty solution though.
It could be a possible solution but as you said, it will be dirty.
Wait so you can't just have it upload to a specific public album? You're kidding... err does anyone know of any good free alternatives that support direct links?
It gives this error with Google Photos API:
"message": "No permission to add media items to this album."
So unlike Picasa API, not even possible to upload to any albums not created by app. Which is weird.
That will probably be due to the Picasa API being deprecated.
If the app created an album, can it upload to same album which created through the api?
I mean if that possible, then in settings menu in ShareX while authenticating google photos account, the app could prompt user to create an album to upload images inside it.
I haven't looked at the new API but by the limitations of the API, possibly not
@Abu3safeer When you upload publicly, sharex will created a shared album specifically for that image, so when you share the link, you are only sharing the image, and not other images you would rather be private. It's just the way Google decided it to work, public images are technically images in a single shared album.
Then I will have many albums, each album contains one image.
Uploading image manually and copy the link will be much effective!
looks like Google hates Third party apps too much.
@Abu3safeer Uploading manually, then clicking "Get public link" will place that image into its own shared album, try it for yourself. The API works exactly how the UI does, you can't work around this by doing it in the UI.
As usual, companies can't leave working stuff alone.
I looked over Blogger API, I cannot find any image API there, because I found very old images using Blogger image browser, and they didn't count toward my Drive quota.
@matthewburnett You are right, a new Album each image, what a mess!
I am currently rewriting our uploader to fix this
This was 5 days ago. Has it been fixed yet?
@panthersdude2001 Rewriting means making everything from the beginning, that means it would take weeks to be working properly.
@panthersdude2001 Rewriting means making everything from the beginning, that means it would take weeks to be working properly.
Ok, So I will have to go back to the old method of using OneDrive. Just uninstalled it. 😡😡😡😡😡😡😡😡🤬🤬😠😠😠😠😠😠😠😾
That is bad attitude @panthersdude2001 , it is FREE tool, the developers spend their time for you, and you don't pay them anything, shame on you, if you want to blame someone, go blame Google, they have disabled the API, not ShareX developers.
Beside you have several image hosts available to use, beside you can customize your own image host there.
That is bad attitude @panthersdude2001 , it is FREE tool, the developers spend their time for you, and you don't pay them anything, shame on you, if you want to blame someone, go blame Google, they have disabled the API, not ShareX developers.
Beside you have several image hosts available to use, beside you can customize your own image host there.
Sorry. Didn't mean to have an attitude. 😣
You can use one of the built in image destinations:
Or you can use on of the "FREE" image hosts available in Chavareto list
Or you can go beyond them and customize yourself a host using Custom uploaders
All these options are just for images!
Merged @matthewburnett PR.
For everyone who has the google photos issue, try a dev build https://getsharex.com/docs/dev-builds
Thanks Matt, Dev build is working great with Google Photos now. Thank you.
Thanks Matthew. It works perfectly functionally, but it's not quite the same as it used to be. I imagine this is due to google's changes and nothing can be done, but I will elaborate.
Prior I could upload an image to a private album and sharex would give me the direct link to that image which would be publicly accessible. Now, I need to create a public album (with reduced permissions, however I think this means someone can still view the "index" of all the images in that album which is absolutely not what I want) and the uploaded image is presented within google's frame. That's not really what I want from the image host, so despite your great effort here I think I'll need to find a different host.
Thanks Matthew. It works perfectly functionally, but it's not quite the same as it used to be. I imagine this is due to google's changes and nothing can be done, but I will elaborate.
Prior I could upload an image to a private album and sharex would give me the direct link to that image which would be publicly accessible. Now, I need to create a public album (with reduced permissions, however I think this means someone can still view the "index" of all the images in that album which is absolutely not what I want) and the uploaded image is presented within google's frame. That's not really what I want from the image host, so despite your great effort here I think I'll need to find a different host.
yeah.. but I can understand the Google's move. They are not providing a free image hosting so steps had to be made
Can you guys see the image? I uploaded it using ShareX to Google Photos. Had to manually get the direct link though.
Also, is there any way to upload to a public album? Not seeing that option even though I have the dev build. Right now it creates a new album every time it uploads, which is pretty messy.
Can you guys see the image? I uploaded it using ShareX to Google Photos. Had to manually get the direct link though.
Also, is there any way to upload to a public album? Not seeing that option even though I have the dev build. Right now it creates a new album every time it uploads, which is pretty messy.
Yes sir i can.
Is there a download link for the beta of the new ShareX? Greenshot is Okay...
https://getsharex.com/docs/dev-builds
Here you go.
If there is no way to upload directly to a public album might have to find another image provider. Gets to messy with a new album everytime I take a screenshot.
https://photos.google.com/lr/photo/ACCQMIEfSasSZCEhevtFP7gMbHEH1usWWDN-Qf4lRqj1UiiBC_bGFzjdduWBmBNoCryc0G6XoWDM546ucdUNfrOnejvE54oeYQ
It finally works!!!
Thanks ShareX team!
I can't try the dev-builds because I don't have that button at all.
However I do see my photos are being uploaded into the Google photos, it just throws the error because it's using the deprecated API.
Did you try uninstalling and reinstalling? I have it.
@moakdesigns You don't see the button? what version of ShareX are you using?
Are you using the Steam version? @moakdesigns I had to uninstall the Steam version and switch over to the Desktop version.
@matthewburnett It works, the image is uploaded, as you said, it is album, not direct link.
Thank you, I wish we find a workground to get the direct link instead.
The direct link is called the base url in the api, and that link is temporary and will stop working. The only way to have a permanent public url is to make an album and share it. You can try this yourself in the UI, navigate to an image, get public url, then keep going to the new public image and get url, google photos just makes new albums each time. There is no concept of public images, only shared albums.
On Jan 22, 2019, at 9:51 AM, Abu3safeer <[email protected]notifications@github.com> wrote:
@matthewburnetthttps://github.com/matthewburnett It works, the image is uploaded, as you said, it is album, not direct link.
Thank you, I wish we find a workground to get the direct link instead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/ShareX/ShareX/issues/3884#issuecomment-456426974, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKMl5UXVYFIFknyBGLULBtLOlF7SukWiks5vFyVogaJpZM4aD94l.
@matthewburnett does that mean if I right click and the image and copy it is link, that link will be temporary?
I switched over to mixtape.moe as my public ShareX uploader. I'll probably just use Google Photos or Drive to archive screenshots.
I personally wouldn’t recommend using someone else’s (free) uploader. We recommend using a cloud based solution you own, such as Google Cloud Storage or Amazon S3, it’s what we (devs, mods) personally use. We have guides and a discord for help and support configuring it https://getsharex.com/docs/google-cloud-storage
@Abu3safeer Correct, direct image links are all temporary.
@matthewburnett Thank you very much, I like Google could storage idea, but unfortunately it requires a credit card, fortunately Google play support paying with mobile credit, but it only allow mobile credit via Google play, so for now I just need to find another way to host images.
Tinypic is awesome if images are less than 1000X1000, if above that, the image will be resized to small resolution.
@Abu3safeer Have you tried creating a folder in your Google Drive and using that method. Works very well for me. :)
@darkufo but it does not offer hotlink, I need something direct to use in websites like forums.
Contrary to everyone else, I have no problem uploading to GPhotos. I don't do albums, I just upload them. I know you can't get a direct entry, but who cares. But still Thanks ShareX team for fixing the problem! mic drop
@Abu3safeer No worries.
@panthersdude2001 you're aware that those links will only work for you.
@Abu3safeer No worries.
@panthersdude2001 you're aware that those links will only work for you.
Oh Okay.
@panthersdude2001 you know, forums does only support direct links, beside they didn't even allow uploading to them, or they allow but with limited usage like limited image resolution, or limited file size, that is why I am looking for something direct.
I know there are thouthands of image hosting services, but most of them never last for long, only for short period.
This is why my journey to find the best image host will never come to an end!
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObjectT
at ShareX.UploadersLib.ImageUploaders.GooglePhotos.Upload(Stream stream, String fileName)
at ShareX.WorkerTask.UploadData(IGenericUploaderService service, Stream stream, String fileName)
at ShareX.WorkerTask.DoUpload(Int32 retry)
Message:
The remote server returned an error: (500) Internal Server Error.
Request URL:
https://photoslibrary.googleapis.com/v1/mediaItems:batchCreate
Response:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObjectT
at ShareX.UploadersLib.ImageUploaders.GooglePhotos.Upload(Stream stream, String fileName)
at ShareX.WorkerTask.UploadData(IGenericUploaderService service, Stream stream, String fileName)
at ShareX.WorkerTask.DoUpload(Int32 retry)
Message:
The remote server returned an error: (500) Internal Server Error.
Request URL:
https://photoslibrary.googleapis.com/v1/mediaItems:batchCreate
Response:
Now getting a 500 Error! Please fix!
@panthersdude2001 Try downloading an updated dev build, I made some changes that might fix it.
Fixed. Thanks Matthew
I can grow a link after installing the beta, but the link can't be shared and an account is required to open it. . .
Download the latest dev build, in google photos settings, make sure “Public upload” is checked.
What about using Blogger (from Google) to upload photos? They still have direct link,
I skimmed the API docs and couldn’t find a way to upload media.
I skimmed the API docs and couldn’t find a way to upload media. On Feb 14, 2019, at 8:18 PM, JoaoMXN <[email protected]notifications@github.com> wrote: What about using Blogger (from Google) to upload photos? They still have direct link, — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#3884 (comment)>, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKMl5bBofzrNCoC_tHxNaFo2-Cxugx4Hks5vNgrJgaJpZM4aD94l.
:/
I'm using the blogger upload function to use images at open live writer, that is suffering with the same problem of deprecated API.
@JoaoMXN the fix is currently only available in the dev build (not the stable one). You can either use another uploader on install the dev build inside the ShareX app. I don't remember where it is exactly (not on my PC right now) but check the about/settings for that button.
Somebody please reopen this thread? Time zones seem to be out of whack recently with the move to GPhotos.
@panthersdude2001 Make a new issue describing the problem
Most helpful comment
I am currently rewriting our uploader to fix this.
Rewrite done, please install a dev build.