Get category URL for current post

Pass the category id into get_category_link():

<?php
$category = get_the_category();
$link = get_category_link( $category[0]->term_id );
?>

Update Outputting in template:

<?php
$category = get_the_category();
$first_category = $category[0];
echo sprintf( '<a href="https://wordpress.stackexchange.com/questions/274018/%s">%s</a>', get_category_link( $first_category ), $first_category->name );
?>