''' Libraries ''' #import base64 ''' Inputs ''' # Get a new Authorization_Code each time by running this script and putting the output URL into your browser. Authorization_Code = "YTn895F5DAx5nbT4iZO0DiDZj18PrX_iU9vdPHI4we8Ox2fw4FJW3QVNU1LichEh0" # Login_URL parts Login_Server_Base_URL = "login.eveonline.com" Response_Type = "code" Callback_URI = "http://localhost/oauth-callback" Client_ID = "66c2e9a0e1164a9ab88006abe1e8c7ab" Scopes = "esi-assets.read_assets.v1" State = "" # POST_URL parts ''' Code ''' # Construct the Logon_URL Logon_URL = ("https://" + Login_Server_Base_URL + "/oauth/authorize?response_type=" + Response_Type + "&redirect_uri=" + Callback_URI + "&client_id=" + Client_ID + "&scope=" + Scopes ) if State != "": Logon_URL = Logon_URL + "&state=" + State # Construct the POST_URL POST_URL = ("https://" + Login_Server_Base_URL + "/oauth/token" ) ''' Output ''' print "Logon URL = " + Logon_URL print "POST URL = " + POST_URL print "Response from curl request:" #curl -XPOST -H "Content-Type:application/json" -H "Authorization:Basic Y2xpZW50X2lkOmNsaWVudHNlY3JldDE=" -d '{"grant_type":"authorization_code", "code":"ckEZIa6JUOdoN6ijmqBI...qgpU-SmPsZ0"}' https://login.eveonline.com/oauth/token
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question