cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization and Redirect URL v3

Highlighted
Visitor

Authorization and Redirect URL v3

Let me begin by explaining what I'm trying to accomplish.

Using Delphi 10.2 to compile.

We have a windows desktop program (not a web based app) that uses browser emulation for IE7 through IE11 depending on what version of windows the person is running. We don't need to display a page with the redirect URL, we just get the Authorization Code after clicking 'allow' and then hit the token exchange endpoint.

This method works for a couple other integrations so I'm not trying to get new code to work. The main issue is nothing happens when I click 'allow'. Here's the log of each page request and completion that I see through the TWebBrowser.

 

Signing In:
11/7/2019 11:48:05 AM: Before Navigation - https://login.constantcontact.com/login/login.sdo
11/7/2019 11:48:06 AM: Completed Navigation - https://idfed.constantcontact.com/as/Am6XvWBimo/resume/as/authorization.ping?resume=/as/Am6XvWBimo/r...

 

And here's where I click 'allow'. The page never completes navigation. I actually click it twice. I think it's trying to do something with the resume but can't seem to complete the navigation.


11/7/2019 11:48:08 AM: Before Navigation - https://idfed.constantcontact.com/as/Am6XvWBimo/resume/as/authorization.ping
11/7/2019 11:48:08 AM: Before Navigation - javascript:void(0)
11/7/2019 11:48:12 AM: Before Navigation - https://idfed.constantcontact.com/as/Am6XvWBimo/resume/as/authorization.ping
11/7/2019 11:48:12 AM: Before Navigation - javascript:void(0)

 

Let me know if anything obvious sticks out here, or if you've seen anything like this in the past!

5 REPLIES 5
Moderator

Re: Authorization and Redirect URL v3

Hello @ThomasB865,

 

Thank you for reaching out to Constant Contact's API Support.

 

Are you attempting to use the server flow or the client flow?


Regards,
Jimmy D.
Tier II API Support Engineer
Visitor

Re: Authorization and Redirect URL v3

Your question has helped me,

I was attempting the server flow so that I could refresh the token for the user, but I switched  to Client Flow instead and was able to get a bearer token.

I do get a javascript error on the tbevents.js file.

11/7/2019 2:20:18 PM: Script error.
11/7/2019 2:20:18 PM: https://connect.facebook.net/en_US/fbevents.js

But it seem's the client flow has been more forgiving, and that js file isn't required to gain a token.Thanks for the nudge!

Occasional Contributor

Re: Authorization and Redirect URL v3

hello . I used the server flow but your response is always 

{"error_description":"Authorization code is invalid or expired.","error":"invalid_grant"}

im sure the Authorization code is correct

i have attempted many times

 

Moderator

Re: Authorization and Redirect URL v3

Hi @SilviaG20,

 

The authorization code from Step 3 expires after 60 seconds; are going able to move from Step 3 to Step 4 quickly enough for the code to not expire?


Regards,
Jimmy D.
Tier II API Support Engineer
Occasional Advisor

Re: Authorization and Redirect URL v3

I will start a new thread if you'd like.  Just let me know.   But my issue is the very same as in the original post.  This is also a Windows application, using a webBrowser control.   Doing the 'server' flow.  When "Allow" is clicked, it appears that nothing is getting triggered. Browser remains on the Allow/Deny page.

 

From log--->

WebBrowser1_Navigated
https://idfed.constantcontact.com/as/jkr4A9muH2/resume/as/authorization.ping?resume=/as/jkr4A9muH2/r...
WebBrowser1_DocumentCompleted
https://idfed.constantcontact.com/as/jkr4A9muH2/resume/as/authorization.ping?resume=/as/jkr4A9muH2/r...
WebBrowser1_Navigating
https://idfed.constantcontact.com/as/jkr4A9muH2/resume/as/authorization.ping
WebBrowser1_Navigating
javascript:void(0)
WebBrowser1_Navigating
https://idfed.constantcontact.com/as/jkr4A9muH2/resume/as/authorization.ping
WebBrowser1_Navigating
javascript:void(0)