Search code examples
ebay-api

Ebay API cannot validate my marketplace account deletion endpoint


Ebay is unable to validate my marketplace account deletion endpoint. I am not given any error messages back aside from the generic "Marketplace account deletion endpoint validation failed. Click here to learn more about setting up an endpoint."

The API is attempting to hit the following code on a Laravel application.

` $challengeCode = $request->challenge_code; $verificationToken = "f92e63874c438db0ae62560aa752fad3f92e63874c438db0ae62560aa752fad3"; $endpoint = "https://{domain}/madendpoint";

$hash = hash_init('sha256');
hash_update($hash, $challengeCode);
hash_update($hash, $verificationToken);
hash_update($hash, $endpoint);

$responseHash = hash_final($hash);
Log::error("MadEndpoint Hit");
Log::error($request);
return response()->json(["challengeResponse"=>$responseHash], 200);

`

I can hit the endpoint in postman. The endpoint returns the expected result. The request is returned as application/json. The request is returned with a 200 status. The returned request looks correct.

{"challengeResponse":"5fce4f1b3b0dd1fba1a06dad6364c78de7447305d8de4b1d7137648f2c60ebb1"}

I've added a couple of entry logs so I can verify when the endpoint is hit. I see log entries when I hit the endpoint manually or with postman. I do not see any hits after I save the endpoint on the Ebay side. It's like the Ebay side isn't even hitting it.

I'm struggling with ways to troubleshoot this. Does anyone have any suggestions?

Thanks in advance.


Solution

  • I finally figured out what was going wrong.

    My endpoint was on a https...but I only had the SSL configured with the certificate. I suspected this was the issue since I never saw any traffic from Ebay in my logs and I could only hit the endpoint with Postman if I disabled the SSL verification.

    Once I added the chain and restarted the server, Ebay was able to hit the endpoint.