The Community Commons module in the Marketplace has a function called StringSimplify. This will convert the characters with diacritics to those without, so "ä, ö, ë" will become "a, o, e". Use it to create a local variable of the username with these characters converted that you can use as their username in the API.
I hope this helps!
If you want to remove all accents etc you could create a java action that accepts a string parameter StringInput and returns a normalized string. The following first splits a character like é to e', then removes the accents.
import java.text.Normalizer;
[...]
String s = Normalizer.normalize(InputString, Normalizer.Form.NFD);
s = s.replaceAll("[\\p{InCombiningDiacriticalMarks}]", "");
return s
For example input: Öñíâè results in Oniae
Whether or not this is a decent approach to exchange usernames I leave up to you.