def example():
client = Client(ACCOUNT_SID, AUTH_TOKEN)<EOL>print('<STR_LIT>')<EOL>api_key = client.new_keys.create(friendly_name='<STR_LIT>')<EOL>print('<STR_LIT>')<EOL>key_pair = rsa.generate_private_key(<EOL>public_exponent=<NUM_LIT>,<EOL>key_size=<NUM_LIT>,<EOL>backend=default_backend()<EOL>)<EOL>public_key = key_pair.public_key().public_bytes(Encoding.PEM, PublicFormat.SubjectPublicKeyInfo)<EOL>private_key = key_pair.private_bytes(Encoding.PEM, PrivateFormat.PKCS8, NoEncryption())<EOL>print('<STR_LIT>')<EOL>credential = client.accounts.credentials.public_key.create(<EOL>public_key,<EOL>friendly_name='<STR_LIT>'<EOL>)<EOL>validation_client = ValidationClient(<EOL>ACCOUNT_SID,<EOL>api_key.sid,<EOL>credential.sid,<EOL>private_key<EOL>)<EOL>client = Client(api_key.sid, api_key.secret, ACCOUNT_SID, http_client=validation_client)<EOL>print('<STR_LIT>')<EOL>messages = client.messages.list(limit=<NUM_LIT:10>)<EOL>for m in messages:<EOL><INDENT>print('<STR_LIT>'.format(m.sid))<EOL><DEDENT>print('<STR_LIT>')<EOL>
Example of using the ValidationClient for signed requests to Twilio.
This is only available to enterprise customers.

This will walkthrough creating an API Key, generating an RSA keypair, setting up a
ValidationClient with these values and making requests with the client.