How to get the authorization code to exchange for user access token
Hi, I'm a new developer and its my first time working with OAuth2. Could someone advise me on the next steps into getting the authorization code that should be in the redirect URL link? Using eBay's library, I called OAuth2Api().GenerateUserAuthorizationUrl() where a URL string is returned that links to the consent page. How do i automate that in code that allows me to 'accept' consent & retrieve the authorization code that's embedded in the redirect URL? Attached is my method trying to get the authorization code to exchange for user access token (sorry i'm a noob so its not the greatest code).
Hi, Thank you, but I read through the documentation already. My question is if there's any way to automate the Grant Application Access page, the page where the user is supposed to 'agree' to consent? And I understand that once the user clicks 'agree' it redirects to the accept url where the authorization code is then appended at the end of the redirect url link. Do you have sample code or a method on how to 'agree' to user consent without having a pop up window, so not through UI, but simply to automate it through code? Or is there something else that I'm possibly missing???