You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ApiClient - Client Library that contains the code to manage a config file with OAuth2 settings and classes to do the OAuth2 call and an example call to DigiKey's KeywordSearch Api.
RefreshAndCall - Console app to test out programatic refresh of access token when needed and also check if access token failed to work and then refresh and try again.
FirstTokenProgram - Console app to create the initial access token and refresh token.
Getting Started
Download the zip file containing the source
You will need to Register an application in order to create your unique Client ID, Client Secret, and OAuth Redirection URL. Follow the steps available on the API Portal here https://developer.digikey.com/
In the solution folder update apiclient.properties with the ClientId, ClientSecret, and RedirectUri values from step 2.
ApiClient.ClientSecret=YOUR SECRET HERE
ApiClient.ClientId=YOUR CLIENT HERE
ApiClient.RedirectUri=YOUR REDIRECT URI HERE
ApiClient.RefreshToken=
ApiClient.AccessToken=
ApiClient.ExpirationDateTime=
Run FirstTokenProgram to set the access token, refresh token and expiration date.
Run RefreshAndCall to get results from keyword search.