question

hardikmehta avatar image
hardikmehta asked jshrek edited

Verification Code not getting using post type API URL.

I have rereferred your ref doc. regarding generate verification code using post api but not getting code please brief me how can I receive verification code from clover. please give example with url and params.
Thanks in avance.

REST API
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

What docs are you referring to? https://docs.clover.com/docs/using-oauth-20? Please take a look at the asking a question seciton on our Community Guidelines (https://community.clover.com/page/community-guidelines), you haven't provided enough information for us to help you.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jshrek avatar image
jshrek answered jshrek edited

I was having the issue with not being able to receive the Webhook Verification Code.

From developer dashboard, in the app I am creating, I setup the webhook url and when I clicked on "Send verification code" I could tell it was hitting my server, but the POST and REQUEST data were both empty.

It turns out that Clover will send a hit your server, and you need to return a 200 code first, and then it will send the data after.

So in php, I did this...

<?php
    header(trim("HTTP/1.1 200 SUCCESS"));
    $content = json_decode(file_get_contents('php://input'),true);
    mail( "youremail@yourdomain.com", "TEST my clover webhook", print_r($content, 1) );
    // NOTE: You can store $content in a file or database, but here I am just sending myself a email for testing purposes as it is quick and easy.
?>
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community