We would like to store another account identifier in addition to email address to help in account lifecycle management.
I was looking at using “custom_attributes” in the API for updating a user record:
[https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate]
I am able to update built-in fields like “job_title”:
zoom_user_base="https://api.zoom.us/v2/users/"
my_email="top@sec.ret"
R=requests.get(zoom_user_base+my_email,headers=zoom_dev.headers)
print(json.loads(R.content.decode()).get("job_title"))
R=requests.patch(zoom_user_base+my_email,headers=zoom_dev.headers,data='{"job_title":"Super Peon"}')
R=requests.get(zoom_user_base+my_email,headers=zoom_dev.headers)
print(json.loads(R.content.decode()).get("job_title"))
With output
Peon
Super Peon
However, when I try to add a custom_attribute, I get a 204 status code but the changes are not reflected in the user…When I try to supply JSON including custom attributes, like:
R=requests.patch(zoom_user_base+my_email,headers=zoom_dev.headers,data='{"job_title":"SysAdmin","custom_attributes":[{"key":"uid","name":"uid","value":"my_uid"}]}')
print(R.status_code)
R=requests.get(zoom_user_base+my_email,headers=zoom_dev.headers)
print(json.loads(R.content.decode()).get("job_title"))
print(json.loads(R.content.decode()).keys())
I get:
204
SysAdmin
dict_keys(['id', 'first_name', 'last_name', 'email', 'type', 'role_name', 'pmi', 'use_pmi', 'personal_meeting_url', 'timezone', 'verified', 'dept', 'created_at', 'last_login_time', 'pic_url', 'host_key', 'jid', 'group_ids', 'im_group_ids', 'account_id', 'language', 'phone_country', 'phone_number', 'status', 'job_title', 'location'])
No “custom_attributes” key is found, but the API call did update the job_title and gave no errors or warnings.
Anyone have luck with using custom_attributes?