Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Digital Signatures for APIs #132

Closed
derjones opened this issue Dec 13, 2022 · 8 comments
Closed

Feature Request: Digital Signatures for APIs #132

derjones opened this issue Dec 13, 2022 · 8 comments

Comments

@derjones
Copy link
Contributor

Hey,

starting at 31.01.23 digital signatures are required for specific API calls in EU and UK. (https://developer.ebay.com/develop/guides/digital-signatures-for-apis) The keyManagement API calls are already implemented, but the signatures headers are not added to the specified API calls. Also a createSigningKey request and persisting the keys to a file would be nice.

Ebay created a lib to generate this signatures: https://github.com/ebay/digital-signature-nodejs-sdk

I just saw that you are working on a RC for 8.0.0, do you have plans to add this to this version?

Thanks Jonas

@dantio
Copy link
Collaborator

dantio commented Dec 13, 2022

The RC does not include the digital signatures.
I'll definitely work on this feature and hope to release it this year.
Feel free to contribute!

@derjones
Copy link
Contributor Author

Okay, sure. But lets wait till the version 8 is released to avoid conflicts.

@dantio
Copy link
Collaborator

dantio commented Dec 20, 2022

@derjones
I'll release version 8 probably this week after testing it under production env.
The digital signature feature is already in review. I already had successfully calls with finance API and GetAccount.

@derjones
Copy link
Contributor Author

@dantio Thats great news, thank you for implementing this feature!

dantio added a commit that referenced this issue Dec 22, 2022
dantio added a commit that referenced this issue Dec 27, 2022
@dantio
Copy link
Collaborator

dantio commented Dec 27, 2022

@derjones
Might you like to test the digital signature?
npm i ebay-api@8.2.0-RC.0

let eBay = new eBayApi({ 
  appId: '...',
  certId: '...'
});
const signingKey = await eBay.developer.keyManagement.createSigningKey('ED25519');
// save the JSON somewhere

eBay = new eBayApi({
  appId: '...',
  certId: '...',
  signature: {
    jwe: signingKey.jwe,
    privateKey: signingKey.privateKey
  }
});

const summary = await eBay.sell.finances.sign.getSellerFundsSummary();

@derjones
Copy link
Contributor Author

derjones commented Jan 20, 2023

Yes! Sry that it took so long...
I just testet to create a digital signature and do a request like you suggested, works like a charm.
API endpoints I tested:

  • Issue refund (Fulfillment API)
  • Issuse refund (Post Order API)
  • Proess return request (Post Order API)

Thank you for implementing this features!

@dantio
Copy link
Collaborator

dantio commented Jan 27, 2023

@derjones
Thank you! I'll merge the feature and release it soon.

dantio added a commit that referenced this issue Jan 27, 2023
@dantio
Copy link
Collaborator

dantio commented Jan 27, 2023

Released in 8.4.0

@dantio dantio closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants