question

savecentral-outlet avatar image
0 Likes"
savecentral-outlet asked

Marketplace Account Deletion/Closure Notification Endpoint not verifying challengeResponse

I have an endpoint setup. I entered the endpoint and Verification token I click "save" and it always fails (usually "unknown" type errors).

I have verified the server is getting the request, it is also outputting the JSON challengeResponse and it looks correct (same length as example).

The endpoint is concatenating the challengeCode + verificationToken + endpoint and using it to calculate sha256 in hex (again, sample in docs is same length as the endpoint responses).


More information, I am using perl. code is:

-------------------

#!/usr/bin/perl
use CGI qw(:standard);
use JSON::XS qw( decode_json encode_json );
use Digest::SHA qw(sha256_hex);
my %out;
my $q = new CGI;
my %params = $q->Vars;
my $challenge_code = $params{'challenge_code'};
my $verificationToken = 'SAME STRING AS SET IN ADMIN FOR Verification token';
my $end_point = 'SAME URL AS SET IN ADMIN FOR notification endpoint';
my $string_to_sign = $challenge_code . $verificationToken . $end_point;
$out{challengeResponse} = sha256_hex($string_to_sign);
print "Content-Type: application/json\n\n";
print encode_json(\%out);
exit;

--------------------

And the endpoint url works, I see ebay servers hit it and get a good 200 response. Testing direct in browser shows a good JSON response.

Additionally, using the tool:

https://www.freeformatter.com/message-digest.html#ad-output

I verified the script is producing the exact same digest. at a loss as to why ebay is not verifying correctly.

marketplace account deletion notification endpoint
10 |600 characters needed characters left characters exceeded

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

savecentral-outlet avatar image
0 Likes"
savecentral-outlet answered

And now the process works, no change to my code, so those using perl should be able to do this in a similar way.

10 |600 characters needed characters left characters exceeded

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

gracelyna_22 avatar image
0 Likes"
gracelyna_22 answered

I faced similar kind of issue last time, I am still searching for some proper solution.


My Balance Now

10 |600 characters needed characters left characters exceeded

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

michab2003 avatar image
0 Likes"
michab2003 answered
10 |600 characters needed characters left characters exceeded

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.