infer callback uri if not provided