It looks like you are missing a few parts there, but C# isn’t my forte.
The OAuth flow generally works something like:
User accesses Application
Application redirects user to Infusionsoft OAuth authentication page, specifies redirect URI
User authenticates and allows Application to access data
Infusionsoft redirects to Application endpoint specified with a POST containing access tokens
Application captures and stores tokens to use in the future, presents User with Application interface
Application makes API calls with access token
6a. If the access token is expired, the refresh token is used to get a new access token and refresh token, which are then stored
Application periodically refreshes the refresh token, so that it doesn’t expire at the 6-month mark
I don’t know the particulars of doing this in C# however, I do know the process and it looks like you’re just posting to the endpoints. So maybe my vid that walks through the process (using php) might help. Not for the sake of the language used but more for the high level particulars.
Hi Jared!
A bit late, but I just saw it. Actually I worked pretty much with Infusionsoft and C#. I’m working on an OpenSource library for .NET Standard on GitHub. Just check it out and contact me. If you need a special implementation, I can probably help you out.
Best regards,
Stefan