- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am following the developer's guide to initialize the Data Exchange .NET SDK. It is not clear from the documentation or examples how to use the callback URL to return the OAuth workflow to the client constructor.
I am calling the constructor with:
SDKOptionsDefaultSetup SdkOptionsDefaultSetup = new SDKOptionsDefaultSetup()
{
ClientId = AuthClientID,
ClientSecret = AuthClientSecret,
CallBack = AuthCallBack,
ApplicationName = ApplicationName
};
IClient Client = new Client(SdkOptionsDefaultSetup);
and after the OAuth workflow completes, it sends me in my browser to my callbackURL with the auth code in the query string. Then I am just sitting in my browser with no clear next step, and the final line of code (line 9) above has stalled waiting for a response. How do I use my callback URL to connect the dots back to the stalled line of code in my application so the Client can finish being constructed?
Alternatively, can I just complete my own separate OAuth workflow (as I already have been doing) and give the final three-legged token to the Client constructor somehow to avoid the Client constructor from triggering the OAuth workflow altogether?
EDIT: I was able to figure this out pretty quickly, thankfully. Solved it by specifying my callback URL as a localhost port that is different from the one I am using to run my app. The Client constructor sets up a System.Net.HttpListener for whatever callback URL you specify; I was having issues before because my callback URL was overloaded and my app was intercepting the response that needed to get back to the Client constructor.
Solved! Go to Solution.