Set redirect URL for Spotify API - python-3.x

I know there have been multiple questions regarding this issue... however, I'm not sure how to handle my case.
I am using spotipy to access the Spotify API. In my python notebook, I entered:
util.prompt_for_user_token('<user_id>',client_id='<client_id>',client_secret='<client_secret>',redirect_uri='localhost:3000/callback/')
On the spotify developer website, I have listed localhost:3000/callback/ as my redirect URL.
When I run the prompt, I am redirected to the spotify page where I would click 'okay' to authorize the account. However, each time I click the 'okay' button, nothing happens. Tried using a separate browser, tried restarting my computer... I'm not sure what to do.
Thank you!

After being redirected, the library should prompt you to copy the URL you're redirected to and paste it back in your python notebook. It then grabs the access token from the URL and uses it to authenticate.

Related

Python selenium redirect page to after logging in a Webpage

I am using Selenium for automating a form filling. For this, I have to first login, then navigate to another page after logging in (or browse from the list of sectional wise options of Webportal and then search from list of IDs). I am successfully able to login but unable to change url to the required page which I wish to browse and land.
Is there a way how to browse and navigate through the sectional tabs after login page is opened. It might be difficult to browse(as it is deep inside nested sections) and that is why I am directly trying to give URL to the required ID which I want to open.
When I use
WebDriverWait(driver,DELAY)
driver.get(desired_URL)
to navigate after login, it automatically makes me end up on the homepage before logging in. I also tried another Method
WebDriverWait(driver,DELAY).until(driver.get(desired_URL))
. This gives me an error TypeError: 'NoneType' object is not callable. Nothing worked for me. But actually this should not happen. After successful login, it should navigate to the page which I specify in driver.get(desired_URL) . I know in javascript there is a particular option like driver.navigate().to(<desiredURL>). But I am using Python for my automation.
I would be really greatful for any of your helpful leads in solving my problem.

Google OAuth not working when a user clicks from a LinkedIn link

When a user clicks a link to my site inside their LinkedIn app it doesn't take them to Safari or Chrome, it keeps them in an internal LinkedIn browser.
If the user then tries to create an account via Google OAuth they get the following error (see image).
Is there a way to prevent LinkedIn from opening a link in their proprietary browser, and take them to Safari or Chrome automatically? Or another workaround for this issue?
Neither you can restrict LinkedIn to open your site in other browser nor to stop google to throw the error. To solve this problem, You have to write a script which will open your website in the default browser of the user's device. Whenever user hit your website then check the web browser if it's chrome, safari or any other web browser then continue the request else force the user to open website in user's default browser using the script. That's it.
Hope this suggestion will help you.

Instagram server side authentication 2019

I just can't get it right.
There are docs for instagram api that says do one call, it will redirect user to a page where he authenticate, then you get code from Redirect Url and now using this code you can get token. That is working and it is just fine. But, what if i want to do a website for myself as personal page and show my own instagram photos filtered by tag to ANYONE. I don't need OAuth, any login. I'm ok with creating Node server and make a call smth like this:
http://api.instagram.com/auth?client_id_or_login=vvinog&password=secretpassword
and get token from this call. But it looks like in the internet no one do this, or i dump?
Can you please advice some tutorial, approach that allows me to do that?
Any code snippets are super welcome.

How do I capture the URL after an external website login in ReactJS?

I want to retrieve the URL after opening an external website pop up in my ReactJS/NodeJS application. Basically in my application, I have a button that redirects the page to microsoft online login page. What I want is the URL of the page after the user logs into microsoft online.
Is there any way that's possible? If so, what are my options?
If you navigate to another webpage, your React application is no longer being served to your browser, and can't do anything. You would need to have a script running on the microsoft website, either by writing it in the source code (which I doubt you can do) or by some other method such as a browser extension.
There is no way to track different systems like methods #izb mentioned, if they already dont provide.
Many systems provides information from their servers, push/ping systems.
One of the payment systems, I redirect request, customer pays, and they redirects the page I entered before in their panel, like successful or fail pages.

Facebook iframe application issue

I have developed a face book iframe application in .net c#.First time when user access iframe application
it shows this window but it should ask for permission & allow user to access my app.
When i click go to face book.com it shows permission window.after that when i choose allow its redirecting me to my canvas URL out side the face book.when i try to access 2nd time its working fine.The issue is that for every first time user who want to access the app ist shows the existing window.Please help me to solve this issue.
Thanks
I figure it out.#pastylegs said right.Thanks for your answers.Let me elaborate it.Most of developer just redirecting to specific url so you have to redirect on top window.
1)if you are using a tag so use target=_blank.
2)If your are using any other thing to redirect in any technology so just use
top.location.href='" + codedataurl + "'
where codedataurl is your facebook authentication url which contains client id,redirect url & all.
I hope it will help you guys.
Thanks
If you are using iframes, you need to make sure that when you redirect the user to the authorization dialog, you do so on the top window of the users browser. You can do this using javascript (instead of just a redirect URL).
http://developers.facebook.com/docs/guides/canvas/#auth
Maybe this is the problem?

Resources