Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid return_url #29

Closed
howaskew opened this issue Oct 12, 2019 · 7 comments
Closed

Invalid return_url #29

howaskew opened this issue Oct 12, 2019 · 7 comments

Comments

@howaskew
Copy link

I have a key and a secret, but when I run:
my_token = get_token(key = your_key, secret = your_secret)

The browser opens at:
https://trello.com/1/OAuthAuthorizeToken?scope=read&expiration=30days&name=trello-app&oauth_token=XXXXXXXXXXXXXXXXXXXXXXXXXXX&permission=read

However, all it shows in the browser is 'Invalid return_url'

The redirect_uri created in oauth_app is "http://localhost:1410/"

@jchrom
Copy link
Owner

jchrom commented Oct 12, 2019

Hi,

so your browser does not display the confirmation screen? Eg. this:

Would you like to give the following application access to your account?

If not, let's first try and check if the issue is with trelloR or not. Can you please run the following (don't forget to replace "yourkey" and "yoursecret" with your actual key and secret):

trello.app = httr::oauth_app(
  appname = "trello-app",
  key = "yourkey",
  secret = "yoursecret")

trello.urls = httr::oauth_endpoint(
  request = "OAuthGetRequestToken",
  authorize ="OAuthAuthorizeToken?scope=read&expiration=30days&name=trello-app",
  access = "OAuthGetAccessToken",
  base_url = "https://trello.com/1")

httr::oauth1.0_token(
  endpoint = trello.urls,
  app = trello.app)

Does this work?

@howaskew
Copy link
Author

howaskew commented Oct 12, 2019

Thanks. That's right - it doesn't ask me to allow access.

I ran the code provided and got the same message.

For ref - I installed v0.5.0 with devtools::install_github("jchrom/trelloR") and all the linked packages are up to date.

@jchrom
Copy link
Owner

jchrom commented Oct 12, 2019

Ok, so here is where we're at:

The code I posted above is from the httr package, and it's what trelloR uses to create the token. I recommend you ask for advice there - you can give them the code snippet I posted to show what you're doing to replicate the problem, and your httr version.

Good luck!

@howaskew
Copy link
Author

Ok thanks.
Please could you share an example of a successful token? As it's potentially just a one time approval, I might use the manual token creation method and artificially set my_token. Just to move forward - trying to test an idea out.

@jchrom
Copy link
Owner

jchrom commented Oct 12, 2019

No.

@howaskew
Copy link
Author

Ok thanks. Obviously I meant a dummy one, not asking for your token! I'll look into httr.

@navigate-cgalvao
Copy link

I did the same but it keeps saying that Invalid return_url .... thoughts ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants