I am using Bitly api in Asp.net project to create short Url. I am getting result but it is in json format. How do I retrieve short Url from it?
[HttpGet("sendNotification/{PlanId}")]
[ValidateModelState]
public async Task<IActionResult> SendNotification()
{
var link ="https://chats.landbot.io";
var shortUrl = await GetShortUrl(link);
return NoContent();
}
}
shortUrl giving me everything as below
{"created_at":"2021-10-21T04:01:53+0000","id":"bit.ly/shortUrl","link":"LongUrl","archived":false,"tags":[],"deeplinks":[],"references":{"group":"https://api-ssl.bitly.com/v4"}}
In the above line, id contains the Short link and that's the only link I need. Can anyone tell me what I should do?