-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Simply put, the last line in the code below fails with the exception: TypeError: Object of type bytes is not JSON serializable.
from io import BytesIO
from sendbird_platform_sdk.api import user_api
from sendbird_platform_sdk.model.create_user_data import CreateUserData
with open("profile_picture.jpg", "rb") as profile_picture:
profile_picture_stream = profile_picture.read()
api_instance = user_api.UserApi(api_client)
create_user_data = CreateUserData(
user_id="random_guid",
nickname="example_nickname",
profile_url="",
profile_file=BytesIO(profile_picture_stream),
issue_access_token=True,
)
api_instance.create_user(
api_token="MY_API_TOKEN", create_user_data=create_user_data
)The full exception details can be found here: full_exception_details.txt
EDIT: Added imports.
Metadata
Metadata
Assignees
Labels
No labels