Destiny Bungie Simple OAuth API Example: python & requests-oauthlib

preview_player
Показать описание
In this simple oauth api example we register an app with Bungie, set up a coding environment, code a simple api example to get an auth code, exchange it for a token, and finally make a call to Bungie's Destiny api to return a users profile.

00:24 - Registering an app with Bungie.
05:16 - Setting up coding environment.
07:14 - Coding the run file.
19:34 - Running code and examining response.

Links:
bungie api endpoints:

Music provided by YouTube Audio Library
"Who Do You Think I Think You Are?", Mini Vandals
Рекомендации по теме
Комментарии
Автор

This finally got me to jump into working with APIs, I've been looking at it for a while but I'm not good enough to figure it out on my own. Thank you so much for putting it together in an easy to follow manner.
I'm now trying to figure out where they list some of the path parameters so I can read more interesting data from my favorite game.

JoshRosario
Автор

Thank you for this wonderful video, started programming a couple months back and i wanted to get into the world of api's and considering that destiny 2 is my favorite game i will delve deeper into the games api to make a good web app

oblivionstudio
Автор

Thanks for the video! Had a question regarding the sign in process with OAuth2, the redirect uri is really insecure, are there alternative methodologies to having the user paste in the redirect uri? I figured out how to have python automatically open the link generated for OAuth2 sign-in, I was wondering how I could have the page auto-close and obtain the HTTPS link through cookies or localstorage or whatever. Sorry if I'm completely off the mark here, I'm new to this. Thanks again!

dysepher
Автор

How do you make your visual studios look like that when coding, because mine is very confusing and cluttered with stuff

jonathanramirez
Автор

Thanks, the docs can be confusing on how to truly do this.

DalisYn
Автор

Is it possible to automate the authorization via python? I imagine you would have to send the user to the auth page in their web browser but I'm trying to understand how you would extract the code from the redirect URL that needs to be sent for an Auth token.

JoshRosario
Автор

Hey is there a way to contact you? I have a Bungie API request and was wondering if you do hourly/commission work? Couldn't find any contact info and not sure if your still checking comments.

henrykang
Автор

This is awesome by the way, but one question. The session also apparently gives you a "refresh token", which you can use for 90 days to get a new access token ( and a new refresh token ). How would I apply this particular token to the "fetch_token" session?

wesleyhudson
Автор

Great video! I am very new to all of this. When I try to from requests_oauthlib it says there are problems with the requests_oauthlib. The only error it gives me is "import requests_oauthlib could not be resolved". I went back and checked that I correctly pip installed all the things. If you have any Idea how to help it would mean a ton! Again great video!

augton
Автор

Hey I love the video! Thanks to you I was able to make a request and get my bungie user info, but I'm struggling to take this beyond the terminal window. I'm trying to get vendor information and display it on a webapp using flask and heroku for hosting. So far I have a webapp that redirects users to the bungie page to authorize their account by clicking on a button. I haven't figured out how to handle things when bungie redirects users back to my webapp. Any tips on handling tokens, and resources, and how I should store them? Ideally for the purposes of my app, I would like for the user (Probably just going to be me) to have to request a new token each time so that I don't have to implement a database or deal with expired tokens. Anyways, awesome content!

manuel
visit shbcf.ru