So finally I realized that their image in their sample is outdated. I updated it from 2.0.9 to 3.0.9 and it started working fine.
The string to append to the url is from their documentation by the way, if there is a sql error about retrieving public keys.