12-17-2024 07:55 AM
Hello,
I'm trying to work with Digital Signature for Financing API. Followed the documentation on 'Creating a payload signature' page and everything seems to be well regarding GET requests. I get successfull response from 'sell/finances/v1/transaction' endpoint. The problem is that If I did limit or any other parameter, I keep getting error 215122. Is there a way to include more details in these errors, whats wrong exactly?
My original successfull signature Base:
var signatureParams = "(\"x-ebay-signature-key\" \"@authority\" \"@method\" \"@path\" );created=" + tenCharTimestamp;
string signatureBase =
$"\"x-ebay-signature-key\": {keyResponse.Jwe}\n" +
$"\"@authority\": apiz.ebay.com\n" +
$"\"@method\": GET\n" +
$"\"@path\": {endpoint}\n" +
$"\"@signature-params\": {signatureParams}";
While adding query parameters I get error:
string signatureParams = "(\"x-ebay-signature-key\" \"@authority\" \"@method\" \"@path\" \"@query\" );created=" + tenCharTimestamp;
"@query" added to signatureParams.
string signatureBase =
$"\"x-ebay-signature-key\": {keyResponse.Jwe}\n" +
$"\"@authority\": apiz.ebay.com\n" +
$"\"@method\": GET\n" +
$"\"@path\": {endpoint}\n" +
$"\"@query\": ?limit=200\n" +
$"\"@signature-params\": {signatureParams}";
@query with '?limit=200' added to signatureBase. as per documentation of 'limit=integer&'.
Looking at rfc9421 documentation I can't see any difference if I should be using it in any different manner?
Any help would be appreciated.
Solved! Go to Best Answer
01-07-2025 05:40 PM - edited 01-07-2025 05:41 PM
Hi, thank you for your reponse.
After multiple failures I found out that signatureBase doesn't require @query to be added.. which was really annoying as this is what documentation expects and thats what I was trying to complete.
The resolution was basically to add parameters to http request, so even so you are calling for example:
https://apiz.ebay.com/sell/finances/v1/transaction?limit=200
your signatureBase stays unchanged like this:
var signatureParams = "(\"x-ebay-signature-key\" \"@authority\" \"@method\" \"@path\" );created=" + timeStamp;
string signatureBase =
$"\"x-ebay-signature-key\": {keyResponse.Jwe}\n" +
$"\"@authority\": apiz.ebay.com\n" +
$"\"@method\": GET\n" +
$"\"@path\": /sell/finances/v1/transaction\n" +
$"\"@signature-params\": {signatureParams}";
As you can see, no @query is added to the signature base.
I hope this helps anyone looking for this in the future.
12-26-2024 02:18 AM
Hello,
This can be tricky to debug, but let's see if we can narrow it down.
Here are a few things to check:
Signature Base Format: Ensure that your signature base is correctly formatted. Double-check that there are no extra spaces or incorrect line breaks. The signature base should look like this:
"x-ebay-signature-key": {keyResponse.Jwe}
"@authority": apiz.ebay.com
"@method": GET
"@path": {endpoint}
"@query": ?limit=200
"@signature-params": ("x-ebay-signature-key" "@authority" "@method" "@path" "@query" );created=timestamp
Query Parameter Format: Make sure the query parameters are correctly formatted. For example, ?limit=200 should be part of the @query field.
Timestamp: Verify that the timestamp is correctly formatted and matches the required format.
Signature Calculation: Ensure that the signature is correctly calculated using the private key. You might want to use an SDK or a tool provided by eBay to generate the signature
01-07-2025 05:40 PM - edited 01-07-2025 05:41 PM
Hi, thank you for your reponse.
After multiple failures I found out that signatureBase doesn't require @query to be added.. which was really annoying as this is what documentation expects and thats what I was trying to complete.
The resolution was basically to add parameters to http request, so even so you are calling for example:
https://apiz.ebay.com/sell/finances/v1/transaction?limit=200
your signatureBase stays unchanged like this:
var signatureParams = "(\"x-ebay-signature-key\" \"@authority\" \"@method\" \"@path\" );created=" + timeStamp;
string signatureBase =
$"\"x-ebay-signature-key\": {keyResponse.Jwe}\n" +
$"\"@authority\": apiz.ebay.com\n" +
$"\"@method\": GET\n" +
$"\"@path\": /sell/finances/v1/transaction\n" +
$"\"@signature-params\": {signatureParams}";
As you can see, no @query is added to the signature base.
I hope this helps anyone looking for this in the future.