Register a User
How to register a user with the Python SDK
Use RegisterUser to register a new user the first time they open the app.
This step also fetches the creative token information for the user in the same request.
register_event = RegisterUser(client, user_data)
try:
response = register_event.send()
user_data.set_user_creative_token_info(response)
print("User registered & creative token info set.")
except Exception as e:
print("Error during user registration:", e)After this call:
- The user is registered with Audiencelab
- The user_data object is updated with the creative token info
If you register the user using this method, you do not need to call FetchToken separately.
Call RegisterUser once, at app install or first open.
For all future sessions, skip registration and directly send events using the existing user_data.