cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid redirect

Occasional Participant

Invalid redirect

Hi,

 

I'm using the omniauth gem for Railshttps://github.com/asanghi/omniauth-constantcontact2 and my app seems to be going to Constant Contact correctly via "Grant Access" but then it explodes with a very unhelpful "Invalid redirect" error.

 

My callback uri for my app is http://localhost:3000/auth/constantcontact/callback with is following the convention of integration with five other apis that are working fine.  Any ideas why it doesn't like my callback?  The error doesn't even tell me what uri I am trying to use.  That would be very helpful information for that error.

 

The earlier omniauth-constantcontact gem just gave me NullPointerExceptions.  It might be worth investing in something to track exceptions like New Relic.

 

 

15 REPLIES 15
Occasional Participant

Re: Invalid redirect

Also, it keeps asking me to log in every time I try to auth which is making it even more frustrating.  Could you please retain login?

Occasional Participant

Re: Invalid redirect

Looking at the source for the https://oauth2.constantcontact.com/oauth2/oauth/confirm_access page, I see that it is using an old uri for the redirect.  Caching issue?  This is about 30 mins old and I've resaved a dozen times.

Highlighted
Moderator

Re: Invalid redirect

Looked at this on our side, looks like you have two API keys.  One of which is out of sync with our database right now which we are looking at.  That key is not enabled as it requested Partner API access but we can't find you as a partner (support would have been following up with you on that today).  If you're attempting to use that key, it won't work as it is not an active key.  If you're using the other key, the redirect_uri isn't a locol_host:3000 URI.  That key is set to your development environment for your company and would need to be updated. 

 

Can you PM me which API key you're using?

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

Re: Invalid redirect

ConstantContact hasn't got back to me yet so I'll post here for the next person getting these issues.

 

Since my first account seems to be broken because I asked for Partner access, I created a new account.  I was VERY careful to get the correct URL because CC seems to have issues caching/updating them.  This worked fine for my development/test env (although it kept asking me to log in and grant acccess EVERY time, which I guess could just be an annoying "feature").  Once I was happy with that, I created another app under my new account for my production site.  This has caused the old "the client ID : [my new app id] is not valid or has been disabled" to happen again.

 

I'm going to create a new-new account for production now.  Wish me luck.

Occasional Participant

Re: Invalid redirect

Nope.  Creating a new-new app didn't work.  Getting key "is not valid or has been disabled" all on this one too.

Occasional Participant

Re: Invalid redirect

Just gave it another shot.  The new-new production key works now.

Moderator

Re: Invalid redirect

I tested both your keys in production against my own account and both worked without issue.  I've also confirmed all keys are enabled, redirect_uri values are correct in all databases and that there are no issues with rate limits on any of the keys.  It looks like everything should be working for you.

 

Is it possible for you to post your code you're using or email it to webservices@constantcontact.com?  At this point, it's likely that the problem is a coding issue rather than configuration.  We did resolve the redirect_uri issue when you reported it, sorry for not posting that resolution though. 

Dave Berard
Senior Product Manager, Constant Contact
Member

Re: Invalid redirect

I am having the same issue with omniauth constant contact 2 gem in rails. I get invalid redirect. I have the same url set for both. Wish I could get some more info on the errors :/

Moderator

Re: Invalid redirect

Sorry you're having a problem here.  The redirect_uri mismatch error is only returned when the URI you set up does not match the one you're passing identically (with the exception of query parameters which can be optionally added on the request and are not used for comparison purposes).  Can you email us your API key and code sample so we can look at what you're doing and see if there is some sort of issue?   webservices@constantcontact.com

Dave Berard
Senior Product Manager, Constant Contact