Not only do you need to add System.Configuration
in front of ConfigurationManager.AppSettings["api-url"].ToString();
you also have to add the reference to the assembly System.Configuration.dll
.
Here is link to similar question The name 'ConfigurationManager' does not exist in the current context