• Resolved Imagesolidberlin

    (@erikneitzel)


    Hi there,
    Thanks again for your great service, I appreciate it.
    So far I’ve just been using the plugin. Today I started implementing your API via…

    $cleantalk_antispam = new CleantalkAntispam($apikey, $email_field);
    $api_result = $cleantalk_antispam->handle();
    if ($api_result->allow === 0) {
    // error
    }
    // fine

    … and requests are being passed through – so it works. Yet it seems that requests are not visible in the global antispam log view for the domain I implemented the API? I can find neither allowed nor denied requests of the API, but I can see all requests send through the plugin.

    Is there a dedicated API log view on your end?

    Thanks
    Erik

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Imagekatereji

    (@katereji)

    Hello @erikneitzel

    Which API method are you configuring? If it’s spam_check, then yes, no logs will be stored on our end.

    Thread Starter Imagesolidberlin

    (@erikneitzel)

    Hello @katereji
    I’m using check_newuser. Are there any logs on your end?
    Thanks
    Erik

    Plugin Support Imagesergecleantalk

    (@sergecleantalk)

    Hello Erik,

    The API method ‘check_newuser’ works the same as for the WordPress plugin. All logs are here:

    https://cleantalk.org/my/show_requests

    Have you tried this guide:

    https://cleantalk.org/help/api-check-newuser

    Thread Starter Imagesolidberlin

    (@erikneitzel)

    Hello @sergecleantalk

    Yes I followed the guide and everything seems to be working, since I receive:

    {
    "suggestions": [
    "Everything looks well!"
    ],
    "request_data": {
    "method_name": "check_newuser",
    "auth_key": "z***y***U6esy6U*****de",
    "message": null,
    "sender_nickname": "asdf",
    "sender_email": "mail@***********",
    "sender_ip": "109.**.**.***",
    "js_on": 1,
    "event_token": "0365714472*****b8a31523640acf2093f87246faf453b0079bdefe7b097eb",
    "agent": "php-cleantalk-check",
    "sender_info": "{\"REFFERRER\":\"https:\/\/www.***********.com\/index.php\"}"
    },
    "verdict": {
    "allow": 1,
    "comment": "*** User allowed. Anti-Spam by CleanTalk. ***",
    "error": "",
    "request_link": "https://cleantalk.org/my/show_requests?request_id=85edc9131f0cc372edc39b0fbbfa7085"
    }
    }



    And yet there are not API logs in https://cleantalk.org/my/show_requests (neither allowed nor denied). I can see the requests sent from my CleanTalk plugin, however. Just not the ones initiated by API integration.

    If you want to check: https://cleantalk.org/my/show_requests?request_id=85edc9131f0cc372edc39b0fbbfa7085 – shows nothing: “No records found.”

    Do logs have to be enabled explicitly?

    So far I’m using:
    $cleantalk_antispam = new CleantalkAntispam($apikey, $email_field);
    $cleantalk_antispam->setNickName($username);
    $cleantalk_antispam->setEventToken($ct_bot_detector_event_token);
    $api_result = $cleantalk_antispam->handle();
    if ($api_result->allow === 0) { }
    else {}

    Thanks
    Erik

    Plugin Support Imagesergecleantalk

    (@sergecleantalk)

    It appears that you have enabled the ‘Don’t save approved requests’ in your CleanTalk Dashboard:

    https://cleantalk.org/help/faq-work#stored_messages

    Could you check?

    You can try to use the test email stop_email@example.com to block the request.

    Thread Starter Imagesolidberlin

    (@erikneitzel)

    Image

    Hello @sergecleantalk

    That option is not enabled, see screenshot attached. Also, I receive approved requests from WordPress plugin usage.

    What happens now, in addition, is, I get:

    {
    "suggestions": {
    "critical": [
    {
    "stack": "getCleanTalkResponse()",
    "message": "Something wrong with your CleanTalk license, visit your CleanTalk dashboard to check the license status"
    }
    ]
    },
    "request_data": {
    "method_name": "check_newuser",
    "auth_key": "9EP96fAd*******HJN9MLTi5pysf",
    "message": null,
    "sender_nickname": "Test123",
    "sender_email": "stop_email@example.com",
    "sender_ip": "109.**.**.***",
    "js_on": 1,
    "event_token": "03657199726d*******3640acf2093f87246faf453b0079bdefe7b097eb",
    "agent": "php-cleantalk-check",
    "sender_info": "{\"REFFERRER\":\"https:\/\/www.*******.com\/index.php\"}"
    },
    "verdict": {
    "allow": 1,
    "comment": "*** Antispam disabled. Check access key in CleanTalk plugin/module options. Anti-Spam by CleanTalk. ***",
    "error": "",
    "request_link": "https://cleantalk.org/my/show_requests?request_id=f3ff85a3e81f399d40278eb27c5274b5"
    }
    }

    There is nothing wrong with my license that I could see. Cleantalk premium works fine with WordPress plugin, just not with API.

    Furthermore, stop_email@example.com received verdict allow: 1 – but that could be due to the “Antispam disabled” license “problem”.

    I’m trying to lookup https://cleantalk.org/my/show_requests?request_id=f3ff85a3e81f399d40278eb27c5274b5 but it times out.

    So three issues:
    – no logging of API calls, even though “Don’t save approved requests’ is not enabled
    – license error with valid license
    – show_requests call timeout

    Thanks
    Erik

    Plugin Support Imagesergecleantalk

    (@sergecleantalk)

    Please check the access key you are using. The auth_key in your log is too long.

    Thread Starter Imagesolidberlin

    (@erikneitzel)

    Hello @sergecleantalk

    Yes, both of the following values are wrong, even though they are the only ones listed as “API keys” on your side and your PHP example shows “apiKey”.

    Image

    I now tried using the domain access key for one of my projects and it works, including logs.

    Thanks
    Erik

    • This reply was modified 3 months, 1 week ago by Imagesolidberlin.
    • This reply was modified 3 months, 1 week ago by Imagesolidberlin.
    • This reply was modified 3 months, 1 week ago by Imagesolidberlin.
    • This reply was modified 3 months, 1 week ago by Imagesolidberlin.
    Plugin Support Imagesergecleantalk

    (@sergecleantalk)

    “User Token” and “Hoster Access key” are not for this purpose. Please use the ‘Access key’ from the main page:

    https://cleantalk.org/my/

    ImageSergeM

    (@serge00)

    We haven’t received your reply in a few days, so I’m going to mark this topic as “resolved”.
    If you have any further questions, you can start a new topic anytime.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.