Skip to content

Instantly share code, notes, and snippets.

@tintinno
Created March 29, 2020 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tintinno/4e8953259c8588332e2a7bf96dc8aa13 to your computer and use it in GitHub Desktop.
Save tintinno/4e8953259c8588332e2a7bf96dc8aa13 to your computer and use it in GitHub Desktop.
# An example of authenticating to SDL's API with Python
from zeep import Client
username = 'someUser'
password = 'SuperSecurePassword'
hostname = 'https://cms.example.com/InfoShareWS/'
client = Client(hostname + 'Application25.asmx?wsdl')
resp = client.service.Login('InfoShareAuthor', username, password)
token = resp['psOutAuthContext']
print(token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment