Created
June 6, 2024 16:46
-
-
Save filipeandre/c49094d451c225f1523474ca2bc84648 to your computer and use it in GitHub Desktop.
Validate hello sign key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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