Here is the latest reply from Site5, my server company
Hello,
Thank you for the update.
I am able to replicate the issue where connecting to the plugin with the app API connection from our server end. Here I could see that intial error which you are getting the resposne output from the connection as ‘Failed to query total number of items in API response.Forbidden {“request_url”:“https://api.envato.com/v1/market/total-items.json",“response_code”:403,“response_cf_ray”:“5a5e7db6b93eecaa-DFW”,“response_server”:"cloudflare”}’.
This indicates that the connection is rejected from the server end due to various factors. We can see there might be more than one reason for this issue.
However, I noticed that once performing the connection iteration to the API https://api.envato.com/v1/market/total-items.json link works once and randomly as you see below and most of the time could see ‘curl: (56) SSL read: errno -5961’ or curl: (35) SSL connect errors.
=========================================================
- Connected:
root@cloud [/home/sweetenings/public_html/wp-content/plugins]# curl -IL https://api.envato.com/v1/market/total-items.json 443
HTTP/1.1 404 Not Found
Date: Tue, 07 Jul 2020 02:30:12 GMT
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
Set-Cookie: __cfduid=dc29bae361eea2eeb68d3db7fa52646cd1594089012; expires=Thu, 06-Aug-20 02:30:12 GMT; path=/; domain=.envato.com; HttpOnly; SameSite=Lax
x-amzn-RequestId: 40bdee88-aea2-49e1-97e5-746ded1889e4
Access-Control-Allow-Origin: *
x-amzn-ErrorType: MissingAuthenticationTokenException
x-amz-apigw-id: PR-oLFlFIAMF7TQ=
X-Cache: Error from cloudfront
Via: 1.1 a43b25e4690d3514ec42aed46c3e2f79.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: IAH50-C1
X-Amz-Cf-Id: 7UxRfTV8Jx9zS2Zo5QZQmxxLP29EuJv3g4-qKVnEY-aAN9K53lHkTg==
CF-Cache-Status: DYNAMIC
cf-request-id: 03c8b513e90000b3bee7277200000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 5aee24664ecab3be-IAH
Connection Failure:
root@cloud [/home/sweetenings/public_html/wp-content/plugins]# curl -IL https://api.envato.com/v1/market/total-items.json 443
curl: (56) SSL read: errno -5961
root@cloud [/home/sweetenings/public_html/wp-content/plugins]# curl -k --tlsv1.2 -XGET https://api.envato.com/v1/market/total-items.json 443
curl: (35) SSL connect error
root@cloud [/home/sweetenings/public_html/wp-content/plugins]# curl -k --tlsv1.2 -XGET https://api.envato.com/v1/market/total-items.json 443
curl: (7) Failed to connect to 0.0.1.187: Invalid argument
{"error": "Missing or malformed API token: You need to provide an API token to access the API. The token must be a 32 character long alphanumeric string. See https://build.envato.com/api/#token", "reason": "missing-token"}
=========================================================
One of the reasons might be with
- Firewall issue.
- Curl outdated version
- NSS outdated version
The outdated version of the cURL package might be causing this issue By default, curl will automatically negotiate up to TLSv1.1 but can be made to negotiate TLSv1.2. Currently, I could see that the curl and the NSS versions as you can see below:
Curl Version:
root@cloud [/home/sweetenings/public_html/wp-content/plugins]# curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.
curl-7.19.7-54.el6_10.x86_64
* Tue Oct 01 2019 Kamil Dudka <kdudka@redhat.com> - 7.19.7-54
- fix auth failure with duplicated WWW-Authenticate header (#1757643)
NSS version:
NSS/3.44 z
* Wed Oct 23 2019 Bob Relyea <rrelyea@redhat.com> - 3.44.0-7
- Add back missing Mozilla Policy
The most recent stable version is 7.71. 1, released on the 1st of July 2020, and the NSS version is 3.57. I suggest you to upgrade curl as well as the NSS patch on your end and retest again to verify.
Please also let me know do you have any PHP cURL sample API connection test page to verify which includes the GET connections so we can verify the process.
If you have any questions or concerns please do not hesitate to reach out to our live support again. We are available 24x7.
Regards,
Sandeep G
Web Administrator
Site5 | http://www.site5.com