Google Photo no data error
-
Hi !
I’m facing the “No data returned” error with Google Photos gallery. I believe i’ve setup corectly and followed all the steps, including the workaround since authentification with Google seems a bit tricky.
But still no luck, if trying the “old way” by inserting the shortcode (I did change the “gallery” name that was by default), I got this : Failed to get data. Error:
Invalid album ID (but I’m sure the album ID is correct)How to sorted out ?
Since I can’t use Flickr anymore I would be pleased to replace it with Google Photos and your plugin is my best bet so far…
Thank you.
-
If you are getting a message saying that the album ID is invalid, it must be invalid; the code simply passes the album id to Google to get the result.
You can find all your IDs from Photonic → Helpers → Google Photos.
Hi,
Unfortunately I don’t think the issue was as easy as that… when checking in Helpers, it shows No albums found.
And when adding via the photonic button in editor, I got this message :
No data was returned for the user you provided. Please verify that the user has the content you are looking for.
Not sure what’s wrong then…
Are you sure you authenticated with the right user? The code that checks for the existence of albums is very simple – it just looks to see if the authenticated user has the albums or not.
In your case it doesn’t look like the authentication is failing – you would have seen a different message in the shortcode builder if that was the case.
Double-check a few other things, please:
- When you are performing the authentication to “Choose an account”, are you picking the correct account? Did you select the option to “Use your own OAuth credentials” in the authentication workaround? Can you retry the authentication again?
- If you go to Google’s page and click “Try this API”, are you able to see all your albums?
Do you have a live URL that I can look at?
Hi,
I’m pretty sure I’m using the right user.
1. I did exactly like described, so including the use your own Oauth credentials. And did more than once with no luck…
2. When I do that, here is the http response :
{
“nextPageToken”: “CkAKPnR5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLnBob3Rvcy5saWJyYXJ5LnYxLkxpc3RBbGJ1bXNSZXF1ZXN0EvcCQUhfdVE0MzhwblUtbXhfMWZVNS0xVTVReTYteEhRR3VnLXlfTU5uVy05TkRabnJUWGRnNUFtbk9UN3R3U0o0MXZZWkxiaWlvZmtlYmpqUUtCMl9WLWVWRDVGZXVGQ1RlSThYaTdJOE5FNmt5dUswMURnbWE3X3BWQktreGJyYXM4U2R6eVNnVHBRaHc5LWtmSHNPVDV0RWNoU21QaFRkODNrVjdLSEtXSmtRYTJkdFhiTlFQUFVlSzFsNERQZ25zQUNMXzQtS0M3OU1pY0hlQXBUaTFYY3RLX1pyalN5YjZEMlZCcFNVd2F4VkFkUVBacG0wS0tCNklwRXZfbUdxWklud0ZqYzBxUWhVVWxEa2NXc2ZMczZhamxOSDg1cUJELVNyVGpHdnJtUHQ1elFaRjhMaWpMa2Fvbm80RnhjNUxKSWhkMWt5T2VVT1JwaTMzamVDR25MNXNBdG5PTVBWSmR0Nkd0Y2hxa3pOVUpmc0tpY3NSdlFz”
}Does that help ?
Here is a link of my album :
From what I understand, the album ID start at AF until I got the ?key= am I right ?
Also I’ve replaced the “gallery” name by default to photonic in the shortcode. The gallery is supposed to show up on this page :
https://www.thailande-et-asie.com/photos-malaisie/penang-2017/
Thanks
2. When I do that, here is the http response :
{ “nextPageToken”: “CkAKPnR5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLnBob3Rvcy5saWJyYXJ5LnYxLkxpc3RBbGJ1bXNSZXF1ZXN0EvcCQUhfdVE0MzhwblUtbXhfMWZVNS0xVTVReTYteEhRR3VnLXlfTU5uVy05TkRabnJUWGRnNUFtbk9UN3R3U0o0MXZZWkxiaWlvZmtlYmpqUUtCMl9WLWVWRDVGZXVGQ1RlSThYaTdJOE5FNmt5dUswMURnbWE3X3BWQktreGJyYXM4U2R6eVNnVHBRaHc5LWtmSHNPVDV0RWNoU21QaFRkODNrVjdLSEtXSmtRYTJkdFhiTlFQUFVlSzFsNERQZ25zQUNMXzQtS0M3OU1pY0hlQXBUaTFYY3RLX1pyalN5YjZEMlZCcFNVd2F4VkFkUVBacG0wS0tCNklwRXZfbUdxWklud0ZqYzBxUWhVVWxEa2NXc2ZMczZhamxOSDg1cUJELVNyVGpHdnJtUHQ1elFaRjhMaWpMa2Fvbm80RnhjNUxKSWhkMWt5T2VVT1JwaTMzamVDR25MNXNBdG5PTVBWSmR0Nkd0Y2hxa3pOVUpmc0tpY3NSdlFz” }
Does that help ?
Thanks … while this does help, what it tells me is that the API is unable to find your albums! And this is not happening just with Photonic, but with Google Photos as a whole (since the “Try this API” feature is provided by Google directly).
One thing though – you are getting a
nextPageToken
, which means that something weird is going on: Google is telling you that you have albums on the next page, but not on the current page!! Photonic’s code uses thenextPageToken
only if the current page has albums, but if the current page has no albums, Photonic assumes that it has reached the end of the stream.If you were getting a correct response, you would have got an
albums
node along with thenextPageToken
, something similar to this:{ "albums": [ { "id": "AKMhXYxmTsxFmsIJOAI3qZ0XM_kHlTf88PMQi0N770n1ZXJQhKyhH8o4qgJMPldgyLjHZuhnHrlh", "title": "Sydney", "productUrl": "https://photos.google.com/lr/album/AKMhXYxmTsxFmsIJOAI3qZ0XM_kHlTf88PMQi0N770n1ZXJQhKyhH8o4qgJMPldgyLjHZuhnHrlh", "mediaItemsCount": "36", "coverPhotoBaseUrl": "https://lh3.googleusercontent.com/lr/AGWb-e5tXhEiN930oYWpsRezIWLz4s5jps89N-rFRk2GR0UX4W4b85sTOTiSB8n6MJ7qvmlSap4UNKUEd0nBJ6lesUorWHwm32GRYZY4-RpkY5KbnNdU7E4A38bpUHHNYIuLyKbl2QYMmNQSg7TFnUW16cH0dGVnBdz2sdjaPzLEONiyogladJi27HyUFIXo43gug8MwFPTfm82-qJ-e_wfWaZN8E35zZlo8DqXKxLu7GNw4TMxKNFlxE6OwVqMp8VlKdDiZvthQIqpKceHaxt1Q6pKRznoMTJNbEqybGppFecye6PISkx62MeaGf-fBehb-ZKP1YPVD2z7pJ_UZiwtAlqhYA2FNVfiYcGFFaA7m80lSSlrmxKIOHy7_noQuBemX1oE4V6zW-NpalgHj8zJKB28aGO02NmZWPpyqe1FAyE7Spjh7AkJv4TpyiN8l09kIixMlg81ixuf6SYHcllRmk2CpTfd07tbir8t1Q5Qpy9Oc5QSmRtdA0xJXOfS1uy6LBaAptcgUBSQlBg-3vdrkPNzeSe1Nfxn-t28pxd9icgUrrw6YFWT8yJDhySejNIm0Ymf2SMCJjfA3gqv7_oh2oxojkVHP4KnOk1E7QR2To6LI4eM1fTSQmEp9sZsxiyHGStJ6cE064mMbT90tYmXXoKpPqs_vrm6MyQT_R1A5dv88Cq2E4q3gHxAz7Zh6xvtxNYfqdQMg", "coverPhotoMediaItemId": "AKMhXYzvEbuqpq18j-XOdYgmrPxHfQKk9dpnv5kAt4QBGAAmBkm4uOfP9VB6VKtTwnfU7ae-Th69BfJC8fmrmXBtBGPeZPScUA" }, { "id": "AKMhXYz2mgbcKBRmGHIi-TursTGERR2xyFLajQe-UWR3o1wQvh2G2ucGTgU3nniXgcmFd5c8FePo", "title": "Scotland", "productUrl": "https://photos.google.com/lr/album/AKMhXYz2mgbcKBRmGHIi-TursTGERR2xyFLajQe-UWR3o1wQvh2G2ucGTgU3nniXgcmFd5c8FePo", "mediaItemsCount": "10", "coverPhotoBaseUrl": "https://lh3.googleusercontent.com/lr/AGWb-e4Ocnj3Q9BDFsTpuSiRUif5wtG9ipGNJd_ScEU2t7kM_un_Tc3iX9EFzuxSXcTlBThpyoo1eZgj_MXHtJ1nlSd1rBiWIgci2jTub68uhL_bsprgdkX4BeogK8JikwrN5Hi4Dqqs5pMJhfsijlbXQuaqdg2u57atF5oJXs4_QdnzIYD6mAhI6nbAeBfgt_BdcW1ZpIL4doxtXRmIs9dE5u8X5rcfMYOaTMtAEtnNX8DJdHjgpMK0nX5ed3yY85PkuwKLcTlx6EaPk8PtcqNJZAqALAe0PRQw9B1o5FvVR4pkFOxXIVmFDEeIk80aUlx9x9WP3iLwz8ew3QvKuSNm_pOfYftNk86_jELB9aCA_X28NeF1Es35L0dFCNtigNn-sWeW1evLV8JQQBV7GmuF0L0ORHjHSdl9ml84m3n5HZ1Ie1bsAbHp_3s5cp6Hxm955QBiWvgcw9_BOU_28aXJ8Q2qWr6AtBiiPXzRaP3q1nQJZ7qH5TlYmTdfunboxCeufCG8DZ4YzToFrLeG3yDrSeEox64WwM49z14HcTLqSom-vPbihNNKZROetN9su559gk4dNChgeTKjwCd69XYrxluOA19ky50dCF3rrgbIhrTRf4oa23HnNt3t38EmpVjj8H6ZMC3hGW365vxwMiDYZui-dj0Tw5MJp3ZEYMH1BPxjwIxynFHuBowsO3ZlLnfjQC_q4-e6", "coverPhotoMediaItemId": "AKMhXYxPnzczg3Yw2jzqMUmTRdX5WZVwvMQ29RiMnESYUiG2t7JHUpn5uo9dn9LMrePRxH8mzJvDAdYPQVUc6IXS3Nf7tBrXEg" }, { "id": "AKMhXYx3r1wLaa9Ue8T15uCMb4NZJaNkUTOSVyjH2VWPo61DWStYMzbC3GpCD51Znkb-eARpSlW7", "title": "London", "productUrl": "https://photos.google.com/lr/album/AKMhXYx3r1wLaa9Ue8T15uCMb4NZJaNkUTOSVyjH2VWPo61DWStYMzbC3GpCD51Znkb-eARpSlW7", "mediaItemsCount": "21", "coverPhotoBaseUrl": "https://lh3.googleusercontent.com/lr/AGWb-e4YEqHp8rcZIX6H0deR4JG0Xss8k-qVOxUbmosxbRHInGhhmKe0YwIP8k0UWYBGV4uT0fJvFKFmaTDsVE-7oerYOypxAtrzcPjX-phJDgs8MzSOofZ96BBauYjZpkbBUkaYlaYgEf0vItTYgoB1okcZ0nZJe1XfUTQ-lyiT1sPWDplcSgZemf_p7hxO3KJR4wui8cMZ1PkwhSuj7uUcs4irTjhX5i5XzYRemLn4jDr4BfmygtOiy-WB5dld2b5jJISN8JfC08jUpOY1NeW7OTW91Bnqsi0qv6hS030ZxcLHE8v50nlbs3qZyoXs8AqIsQPg7Kd7II7Eykp_Y28ua99_kXBECD-aAj-Oc-Ce7kLL82WxToldtGiUOx4SJQnFMCMsAsCm4Crvr4IADnLABnpaImSGVADyIzQDXfP2jHkMMhlybuNQMrtkzHiZvG-TuXrjwzWfbXx1_zzo3UKWhZXx4-lgtkWgTI8S4e-TfCIUrvpS4YM59nFhqyEs47tL0Hg5wO330jQtavvaEguLGlyLb9d8xD3JeO5EPjvXXR8c74z_1FC2DeA9J_RaGjVraApCvRWiLwdlLrUsDEyDSZc3XgYQwF5lBeXYDmvPJMM_xOaDB8SQYFpUokN5d3bDEs3voz6APNlm1ZMTatOeaQnwc7eswvRLZna9wxiRkOWqqB0vDqZt_g0DZCXJCx_CWcBrAnpl", "coverPhotoMediaItemId": "AKMhXYxSZLuktuhfB3zPsh-lcVre1P_wQI0nMZ26RRahkxpTZ7lTEENQJz8MUDkqKVALdLPMP7YiCSFb01U5LwqnFVcFnaKq4w" } ], "nextPageToken": "CkQKPnR5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLnBob3Rvcy5saWJyYXJ5LnYxLkxpc3RBbGJ1bXNSZXF1ZXN0EgIIAxL3AkFIX3VRNDM4cG5VLW14XzFmVTUtMVU1UXk2LXhiOURzTTAyU2RySnN6UTV1aV9oVW8xNEx1b1Badmw0QWlzRVNXV25rajZCcXRjQVhQcElUZXVJcS1VYlVtcGNYRTI2R3E1U1EzenhrOXp1S0JoaGR5Q3prOGpZUGVQLVVhZmdfOEt5c2RKWUlrbE5BZVdRd2ZCcmt3eUpBcUFINk1OYU9md3ZxejR1NnBDV2d1NjVsbDR6WHNqbEdRWVJpTjBzYkRPSk9LZVZqQWRaUE1XMV9DUmFuT1E0QmJJYnZPQjhGM1RhYjhhSDAwRkR0cFVoLXdPR09JYXQ1NWZFYlpMTmh3R1JTU3J4Q0F4VlNsZkhaTU9RbGM5eDFld3IxM2s1UmU1WXZDeEtGc0didGg4aS1OM0Fzb2NBU2t3R3JHMnV6Y3huSUw0OXkzNHhlSk5jd2dkeS0zMkNpZGNiSi1UbWFZdXNCcmZlSU1MQnhTZll5a3QxQk9Caw" }
From what I understand, the album ID start at AF until I got the ?key= am I right ?
No, that is not how Google Photos works, unfortunately. That Album ID is quite different from what Google stores internally, and it wouldn’t work in a shortcode.
Do all of your albums have photos? One thing you might want to try from the “Try this API” feature is to take the value returned in
nextPageToken
, and pass it to thepageToken
field for a second call. See if it returns any albums when you do that.Hi,
Albums does have photos, when I try what you suggest, it seems to just returns the exact same next page token….
From what I understand this is quite unusual but related to Google itself? What should I explain to their support to fix that issue ?
Thanks.
Hum… weird, after a 3rd attempt, it is still showing the same nextpagetoken BUT, this time it is showing one a the album (the latest created like in the link above)
Any idea what’s goign on ?
Is the token value the same, or is it similar? Note that the token might appear the same, but might actually be different.
Try specifying a pageSize value of 50 when you are making the first call. For subsequent calls pass the nextPageToken with a pageSize of 50 as well.
This will have to be passed on to Google as a bug, but they don’t respond promptly. I believe you will have to tell them that when you are making a call to their API to fetch your albums, you are getting 0 responses and a nextPageToken though you have several albums. You might need to provide them with steps to reproduce.
One other thing you can try is to execute the API for Shared Albums. It might be happening that Google is somehow excluding shared albums from your results.
Unfortunately until Google does something about it I don’t think you can do much, but let me know if you see any difference with the Shared Albums API.
They look similar but indeed, not the same, anyway, doing so even by choosing pagesize 50 (after adding the nextpagetoken only) give me only the latest album.
Execute the API for shared albums works straight but only show 3 random albums (while a lot more are shared)
Going to contact Google, i’ll let you know how it goes. By the way, since I got the ID of the latest album, I did used the shorcode and it works (but I still got more albums to share so adding them this way one by one is not really practical)
By the way, since I got the ID of the latest album, I did used the shorcode and it works (but I still got more albums to share so adding them this way one by one is not really practical)
Yes, I can understand. As this is more of a problem at Google’s end I am handicapped at the moment.
- The topic ‘Google Photo no data error’ is closed to new replies.