Personas are a powerful tool for account creation. They can be used to create accounts on websites that require 2FA authentication (both with email and phone number).
create_account.py
Copy
Ask AI
from notte_sdk import NotteClientnotte = NotteClient()# retrieve the persona from the Notte console# if you don't have a persona id, you can create a new persona using:# persona = notte.Persona(create_vault=True)# print(f"Persona id: {persona.info.persona_id}")persona = notte.Persona("<your-persona-id>")url = "https://console.notte.cc"# create credentials for the persona (automatically generates a password and stores it in the vault)persona.add_credentials(url=url)with notte.Session(headless=False) as session: agent = notte.Agent(session=session, persona=persona) response = agent.run(task=f"Go to {url} and create an account. Go create an API key and return the API key.", url=url) print(response.answer)
You can then leverage this account for other automation and/or scraping tasks. Agents created with this attached persona are now able to login without any human intervention or additional credentials.