Skip to content

Instantly share code, notes, and snippets.

@filipeandre
Created June 6, 2024 16:46
Show Gist options
  • Save filipeandre/c49094d451c225f1523474ca2bc84648 to your computer and use it in GitHub Desktop.
Save filipeandre/c49094d451c225f1523474ca2bc84648 to your computer and use it in GitHub Desktop.
Validate hello sign key
import requests
from requests.auth import HTTPBasicAuth
def validate_hellosign_credentials(api_key):
url = 'https://api.hellosign.com/v3/account'
response = requests.get(url, auth=HTTPBasicAuth(api_key, ''))
if response.status_code == 200:
print("Valid HelloSign credentials")
account_info = response.json()
print("Account Info:", account_info)
return True
else:
print("Invalid HelloSign credentials")
print("Response:", response.text)
return False
if __name__ == "__main__":
api_key = input("Enter your HelloSign API Key: ")
validate_hellosign_credentials(api_key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment