Get code automatically from redirect.