credential api