Part-DB / Part-DB-server

Part-DB is an Open source inventory management system for your electronic components
https://docs.part-db.de/
GNU Affero General Public License v3.0
782 stars 88 forks source link

Update Digikey API Product Information to v4 #586

Open philm001 opened 3 months ago

philm001 commented 3 months ago

Is your feature request related to a problem? Please describe. Not related to a problem. But the Digikey API has set v3 to be depreciated and I anticipate that Digikey will remove v3 in the near future. They are currently on v4 and this is the recommended API to use.

Describe the solution you'd like Part-DB should be updated to use the Digikey v4 API for product information

Describe alternatives you've considered n/a

Additional context This is a continuation of the issue #579

philm001 commented 2 months ago

Any thoughts on this?

jbtronics commented 2 months ago

I see no urgent need for that right now. The old API is just deprecated and I could not find a timescale on when digikey is planning to remove support for the old one.

Maybe I will look into it, when I have time, but digikey changed some structure of its API so it requires pretty much changes to Part-DB.

philm001 commented 2 months ago

I see I have been experiencing "issues" where every other part that I am entering in via Digikey is giving me an authentication error. I need to re-do the OAuth. Not a big problem because I do it and it works again. I am wondering if it is related to the v4 vs v3. I am also wondering if other users might experiencing issues related to this as well.

hillsandales commented 1 month ago

I cannot get OAuth to work. I've setup the env vars and all, but when I click the OAuth button, I get the following error from Digikey. I've checked that I have the correct client_id set as an ENV VAR.

{
"ErrorResponseVersion": "3.0.0.0",
"StatusCode": 401,
"ErrorMessage": "Invalid clientId",
"ErrorDetails": "client_id query parameter has incorrect value. Send valid client_id",
"RequestId": "<redacted>",
"ValidationErrors": []
}

I'm running part-db inside Docker. I've tried running it internally on my network, as well as behind a reverse proxy. I'm using API v3.