/
var
/
www
/
html
/
sugardemo
/
include
/
api
/
help
/
Upload File
HOME
<!-- /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ --> <h2>Overview</h2> <span class="lead"> Get an access token as another user. The current user must be an admin in order to access this endpoint. This method is useful for integrations in order to be able to access the system with the same permission restrictions as a specified user. The calling user does not lose their existing token, this one is granted in addition. </span> <h2>Request Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td> platform </td> <td> String </td> <td> Which platform on the session, defaults to "base" </td> <td> False </td> </tr> <tr> <td> client_id </td> <td> String </td> <td> The client id for the session, defaults to "sugar" </td> <td> False </td> </tr> </tbody> </table> <h3>Request</h3> <pre class="pre-scrollable"> { "client_id":"sugar", "platform":"base" } </pre> <h2>Response Arguments</h2> <table class="table table-hover"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> access_token </td> <td> String </td> <td> The access token needed to authenticate for other methods. </td> </tr> <tr> <td> expires_in </td> <td> Integer </td> <td> The length of time until the access_token expires. </td> </tr> <tr> <td> token_type </td> <td> String </td> <td> Should always be bearer. </td> </tr> <tr> <td> scope </td> <td> String </td> <td> There is no scope implementation in the current release of Sugar. </td> </tr> </tbody> </table> <h3>Response</h3> <pre class="pre-scrollable"> { "access_token":"c19fff9b-b767-233e-ebb4-512e369d3e39", "expires_in":3600, "token_type":"bearer", "scope":null } </pre> <h2>Change Log</h2> <table class="table table-hover"> <tr> <th>Version</th> <th>Change</th> </tr> <tr> <td> v10 </td> <td> Added <code>/oauth2/token/sudo/:user</code> POST endpoint. </td> </tr> </table>