2
I’m adjusting a code in c# for a url shortener api to send in the sms inside an application, it’s all working, but the out-of-code api works, but within the code the Return comes back nothing, I’m not very experienced in c#, can anyone help me? Follows the code:
public static class Helpers
{
public static string EncurtadorUrl(string url)
{
try
{
string urlMigreMe = string.Format("http://tiny-url.info/api/v1/create?url={0}&apikey={APIKEY}chave_aqui&provider=bit_ly");
var client = new WebClient();
string response = client.DownloadString(urlMigreMe);
return response;
}
catch
{
return "";
}
You are replacing this {APIKEY} with the API key somewhere before making the request?
– Júlio Neto