Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import requests, json
- token_endpoint = "https://gluu.my.domain/oxauth/restv1/token"
- payload = {"grant_type":"client_credentials", "scope":"myScope"}
- client_id = '72***02'
- client_secret = "A***p"
- try:
- response = requests.post(token_endpoint, data=payload, verify=True, auth=(client_id, client_secret))
- except AttributeError:
- print ("no such attribute")
- except NameError:
- print ("no such name")
- print response.text
Advertisement
Add Comment
Please, Sign In to add comment