issus / digikeyapi Goto Github PK
View Code? Open in Web Editor NEWComplete Digi-Key V3 API Client
License: MIT License
Complete Digi-Key V3 API Client
License: MIT License
Preface: Thanks for uploading this, looks much better than the DigiKey git repo one! And I likely think this issue is just me, so reaching out as you may know what I am missing!
I am running MSVS 2019 with .NET Core v3.1
I downloaded your app and changed the target framework to v3.1 in all 3 projects (only one of them was originally targeting v6.1). After filling in the required 2 items in the apiclient.config taken from the Sandbox example. Click run and the request fails.
Unhandled exception. System.Net.Http.HttpRequestException: Request failed with status code BadRequest
at RestSharp.RestClient.ThrowIfError(RestResponse response)
at RestSharp.RestClientExtensions.PostAsync(RestClient client, RestRequest request, CancellationToken cancellationToken)
at DigiKey.Api.OAuth2.OAuth2Helpers.RefreshTokenAsync() in C:\Users\MyUserName12\Documents\My_Projects\StockCount\DigiKeyApi-main\DigiKey.Api\OAuth2\OAuth2Helpers.cs:line 59
at DigiKey.Api.ConsoleClient.Program.Main(String[] args) in C:\Users\MyUserName12\Documents\My_Projects\StockCount\DigiKeyApi-main\DigiKey.Api.ConsoleClient\Program.cs:line 23
at DigiKey.Api.ConsoleClient.Program.<Main>(String[] args)
apiclient.config (with replacemets)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings file="">
<clear />
<add key="ApiClient.ClientId" value="Ncgqt------------------------ljX" />
<add key="ApiClient.ClientSecret" value="hTcL----------SZ" />
<add key="ApiClient.RedirectUri" value="https://localhost:44301/Home/FinishAuth" />
<add key="ApiClient.AccessToken" value="" />
<add key="ApiClient.RefreshToken" value="" />
<add key="ApiClient.ExpirationDateTime" value="" />
<add key="ApiClient.BaseAddress" value="https://sandbox-api.digikey.com" />
<!--<add key="ApiClient.BaseAddress" value="https://api.digikey.com" />-->
</appSettings>
</configuration>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.