Adding a picture to a contact via API
-
Good afternoon. I am trying to add a user's picture to their contact via the API. There is no information in the Help_ItemOperation_RES.xml file for pictures, but I see the <PICTURE> tag in both the IO_change__PRIVATE_Contacts_RES.xml and IO_put__PRIVATE_Contacts_RES.xml file. I tried to convert the picture to base64, but I'm receiving an error. Is this even possible, and if so, how should I encode it? I'm using powershell, and tried:
$pic = [convert]::ToBase64String((get-content $picfile.fullname -encoding Byte))
This is what gave me the 400 Bad Request. I can update the user without the picture tags. I also noticed that in the change file, it has the length, but in the put file, it does not.
Using 22.0.3.3. Thanks.
-
So this morning I was looking at the examples again and realized that the <picture> tag was in the result. When I changed the xml to pass <picture>$pic</picture> it did not error, but when I retrieved the contact, and decoded the picture, it did not change it. I guess, is it even possible to change the picture through the API, or only through the client?
-
Keith Staff
I'll test this, and if I find an issue, will write a fix into the API, likely for vesion 23.5 that willbe out later this year. Should be able to respond back to this post on Friday the 10th.
-
Keith Staff
I tested this and it worked as expected...
Here the xml request that I used, echoed back in the response.
<?xml version="1.0" encoding="utf-8"?>
<MDaemon>
<API productversion="23.5.0" serviceversion="23.5.0.1">
<Request version="23.0" echo="1" verbose="0">
<Operation>ItemOperation</Operation>
<Parameters>
<Item path="PRIVATE/Contacts" action="put" type="contact" cid="2023-01-03_01:14:32:699_3565.3261">
<FirstName>Mallie</FirstName>
<MiddleNames>Signe</MiddleNames>
<LastName>Sevier</LastName>
<DisplayName>Mallie Signe Sevier</DisplayName>
<FileAs>Sevier, Mallie Signe</FileAs>
<Picture><![CDATA[/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCADwAKYDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAA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zKLYsnvs/DNU1PcxLE4J5d/iGpWIxM9HwEzPpXxdP7lZYZVhhrM12nF/upcDt+cfcZbgbv3F+oaM7dxrTDEu4AuZ+052w3EB2FJ1iGllmdNf8hUjIfbLp/YPQTpwcxgNqt0XMoB0AndIhkVCznofftLFEuVVl63ApsZVmG+staY7/b/AJCV03X4uXGZxPEA8wRKOsEX3i1lXId/5HjgOE17sqFZtBjkrYjlwbAb/JKoUXvGIMbs7jNHMBvvDUcKHAKSrTHrWfmBXpRKonSU8n2R1xwwzNwitID3NRtgCvLFPUxbfdcRWmW0v5NZmKvAgo7W2RRFF1gv4IJNhdb78bgwm2KB2Z7QLUUtA2vSDIGVPQ7QD+zC4x92pR0349CvEASqOWLKaObAvNujFz9UISU7+dAFFQvOefzLJa5rzDtuWXIN0I/UG19GH53GWYy0b8wS5a2UHYAoXLUBojdyYqbRvWkXGxvLL8S7B7A/sluWnAH6J4xQtfiDOklUd5jPf0QvSbvpNtwK7zCypeJWYVWcwZb4lsuXmD3lpuETmZqZ3L6kMtVNQogvSCDLxTcKvcviXRjM5hkO0S8wxkjNcb3PeXPOJrMwKhuEHeKmMfuXZcL3O0DGUhhl7iz3nxONQb5l3KvxFWHSUVOZvTNMINXG6ej1l4zKxucXPENSuJiDbt9LBohOczFTMtYdpm5uDRP/2Q==]]></Picture>
<Email1Address>Mallie.Sevier@diojuf.int</Email1Address>
</Item>
</Parameters>
</Request>
<Response version="23.5" et="0.057960">
<Status id="0" value="0x00000000" message="The operation completed successfully."/>
<Result>
<Item cid="2023-01-03_01:14:32:699_3565.3261" action="put" path="PRIVATE/Contacts" ID="7f4e23842e754d53a16cc04ab933c9c3" lastModified="2023-02-15T07:14:33.031Z"/>
<Folder path="PRIVATE/Contacts" lastModified="2023-02-15T07:14:33.031Z"/>
</Result>
</Response>
</API>
</MDaemon>
-
Keith Staff
Russ, xml is case sensitive... The element name is Picture, not picture or PICTURE
-
@Keith Thanks for the reply. Below is the response of my xml. It removed the picture that I had there, and did not populate it. I tried with both a test pic that I converted to base64, and with the one that you provided.
<?xml version="1.0" encoding="utf-8"?> <MDaemon> <API> <Request version="22.0.3" echo="1" verbose="0"> <Operation>ItemOperation</Operation> <Parameters> <Item account="Contacts" path="MAILBOX/Employees" ID="f2f2561fc8e94c949af17807773a29fb" action="change" type="contact"> <FirstName>#######</FirstName> <LastName>#######</LastName> <JobTitle>#######</JobTitle> <Department>IT NETWORK ADMINISTRATOR</Department> <DisplayName>#######</DisplayName> <Picture>![CDATA[/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCADwAKYDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAEDBAUCBv/EABgBAQEBAQEAAAAAAAAAAAAAAAABAgME/9oADAMBAAIQAxAAAAHRafHsxMYOwTABiaaDRQ0xMAAAAiaedANBp0ADAGh2JiBgAAAAMIWnnQ07BgDQMXNScZVBv0zyrTNs47ZGAAhiCJp50xOxgAnVXrFngeiqpZbK7mrs62v5b0rMoDkAAARNPOmBYwCPAv5L0WrGfK3bnrWpz7qWISjo1+62gL5waAAiaM66adgLkwqkkb096tHQZp3uO2YaujBc1e+Sdt9xS3ygwACFp50wLCOSuuFwuXfWk57k5i7r22+hSZihd36WxRvXygCIYRAZrE6eZoYjdBMvS3oYOjJekipy2M2SlrErROuju+Z9I49od5oYQtPOmBZH5ve8+62LFrubo3oZE5bR1TvNKSvi4Pp/O+g1idDcgQRNPOmBZV896HzzrtyVbM1D3zMcikGAnHcfZkeixdu46AvMAImnnQBZBgegyXVXcrQan7TjhnJKFEk6q6K8383TvFgXAARAZ0wjJKiibztCGZ0nCukNincair6XSZ12QTjQztG8mBcABDx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3L6kMtVNQogvSCDLxTcKvcviXRjM5hkO0S8wxkjNcb3PeXPOJrMwKhuEHeKmMfuXZcL3O0DGUhhl7iz3nxONQb5l3KvxFWHSUVOZvTNMINXG6ej1l4zKxucXPENSuJiDbt9LBohOczFTMtYdpm5uDRP/2Q==]]</Picture> <Email1Address>#######.com</Email1Address> <MobilePhoneNumber>#######</MobilePhoneNumber> <BusinessPhoneNumber>#######</BusinessPhoneNumber> </Item> </Parameters> </Request> <Response version="22.0" session="0011562F" et="0.064298"> <Status id="0" value="0x00000000" message="The operation completed successfully."/> <ServiceVersion>22.0.3.3</ServiceVersion> <Result> <Item action="change" path="MAILBOX/Employees" ID="f2f2561fc8e94c949af17807773a29fb" account="Contacts" lastModified="2023-02-15T14:09:27.945Z"/> <Folder path="MAILBOX/Employees" lastModified="2023-02-15T14:09:27.945Z" account="Contacts"/> </Result> </Response> </API> </MDaemon>
I used the following command to submit the xml. I can modify fields fine... just not the picture.
$Response = Invoke-WebRequest -Uri $Server -Method Post -UserAgent $UserAgent -Body $body -Credential $mdcreds -ContentType Text/XML
-
Keith Staff
Russ, what does the AddrBook.mrk show for that contact after you've submitted that request?
-
@Keith Personett Sorry for the delay.. I'm just getting back to this. I looked at the addrbook.mrk file, and it appears that I don't need to wrap it in the cdata tags in the xml, because it was double wrapped in the .mrk file. I took that out, and it works as intended. Thank you.