How can I programmatically reset a user's password I have a native mobile application communicate with my drupal 7 site via services module.  I'd like to give users the ability to reset their password from the app.  Is there a way to initiate this process programmatically, so a an email is generated with a one time use token that expires in 24 hours?

Thanks
You can use the _user_mail_notify() function, along with a user object, to invoke the password reset email:

// Load a user (admin in this case).
$account = user_load(1);

// Invoke the email. It will be queued along with other system mail to be sent during cron
_user_mail_notify('password_reset', $account);


A one time login URL with a 24 hour expiry is included by default with that particular email.