How do you get a user's id from a Magento REST API token? -
following these instructions, it's easy see magento associating oauth tokens user id after they're granted. there way programmatically recover user id, given oauth token?
if helps, can this:
// should collection of 1 element (or 0 if nothing found) $tokens = mage::getmodel('oauth/token')->getcollection()->addfilterbyid($tokenid); foreach ($tokens $token) { echo $token->getcustomerid(); }
Comments
Post a Comment