Using Extended Character Sets in API Calls

Issue

You want to use a non-standard character as a value (or part of a value) in an API call (e.g. é), but when you put it in, the call does not work (either failing with an error or not posting the expected character).

 

 


Solution


Encode the extended characters using ASCII URL encoding for UTF-8. There are sites that will perform this encoding for you, here is one: https://www.w3schools.com/tags/ref_urlencode.asp. For example: making this call, " https://<munchkinid>.mktorest.com/rest/asset/v1/folder/{folder id}/tokens.json?access_token=<accesstoken>&name=TestName&value=Hello+%C3%A9marketo&type=text&folderType=Folder " will create a token called "TestName" with a value of "Hello émarketo"