KRB5 ticket

Is there a way in C using krb5.h that you can authenticate to a server and get a Kerberos ticket?
Thanks in advance