• I configured Google’s API Manager with instructions in the Documentation Page. Everything goes well, but when I’m trying to add gallery to my page then error appears “No data returned. Error code 401”

    I was making fix with instructions from Documentation Pape in Google OAuth2 Playground, but this didn’t help.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    The error message on your page says:

    Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential

    This happens typically if you have a security plugin that modifies URLs being called from your site, or if your hosting is blocking HTTPS calls. See this link for an example.

    Thread Starter czrbrz

    (@czrbrz)

    I tried troubleshooting mode with only Photonic enabled, and the same problem. So this is not a problem with some plugins.

    Plugin Author Sayontan Sinha

    (@sayontan)

    What about your host? As per the link I provided, did you check about making HTTPS calls from your site? Note that this is different from enabling HTTPS on your site – this specifically deals with some hosts blocking HTTPS calls made by plugins to external URLs such as Google.

    Thread Starter czrbrz

    (@czrbrz)

    Before I don’t have this problem, but I’ll contact with my host and ask.

    Thread Starter czrbrz

    (@czrbrz)

    I contacted with the domain host and they told me that they are not blocking HTTPS. They also checked if there are any errors on the server when trying to add photos and there are no errors.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry, in that case I am not sure if I can help you.

    So far I have had 4 cases (including yours) where the user faced this issue. The first time this happened I wasn’t able to find the root cause. The next two times it turned out that the blocking of HTTPS calls by the host was the problem.

    We can try troubleshooting further, wherein, if you look through your server logs and tell me what URL is being called for Google, I can take a look. But generally, as the error says, something is stripping out your access token (certainly not Photonic).

    Thread Starter czrbrz

    (@czrbrz)

    I tested some other plugin for Google Photos gallery, and works good. But this plugin using application type “Other”. Not “Web application”.
    If this is not problem with plugin then maybe is problem with “Google Apis”.

    Plugin Author Sayontan Sinha

    (@sayontan)

    One question: you had another forum query a month back. This was working at that time, right? What changed in between?

    Thread Starter czrbrz

    (@czrbrz)

    After my last problem plugin works good for sometime. During this time I changed almost nothing on my blog, but after updating WordPress I had a JSON error and couldn’t save any changes on my blog. I don’t remember if Photonic wasn’t working then. I tried to fix the JSON error with a manual WordPress update, but something went wrong and I asked the host to restore the backup. JSON error is gone. Only now I have a problem in Photonic.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Can you check with your host regarding my previous query? What is the URL that is getting sent to Google? Basically I want to know whether any parameters are being dropped or added for the call being made to Google.

    Thread Starter czrbrz

    (@czrbrz)

    What exactly URL are you asking?

    BTW. I checked errors by tool Site Health and I have some more problems maybe related to Photonic problem:

    The REST API encountered an error Performance
    The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

    The REST API request failed due to an error.
    Error: [] cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

    Your site could not complete a loopback request Performance
    Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

    The loopback request to your site failed, this means features relying on them are not currently working as expected.
    Wyst?pi? b??d: (0) cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received

    An error occurred while checking whether your site can be found by search engines SEO
    Ryte offers a free indexability check for Yoast SEO users. The request to Ryte to check whether your site can be found by search engines failed due to an error.

    Error details: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

    Thread Starter czrbrz

    (@czrbrz)

    I checked this errors and some other plugin makes this errors with rest api and loopback.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry, I missed responding to your post.

    What exactly URL are you asking?

    Basically I was referring to this statement of yours:

    I contacted with the domain host and they told me that they are not blocking HTTPS.

    What happens is, from your server Photonic makes a call to https://photoslibrary.googleapis.com/v1/, and depending on your selections the call goes either to albums, sharedAlbums, or mediaItems:search. This call is an HTTPS call (see the https in the URL). Can you check with your hosts, what is the URL that is being called there? Google is complaining that the URL there is missing the OAuth2 token, but that is not possible from within Photonic – if you don’t have an OAuth2 token, Photonic will not even let you call Google. So, something is removing the token, and I want to know what.

    Who is your hosting provider?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘No data returned. Error code 401’ is closed to new replies.