How do I get the REST v10 "access_token" (and optionally other token info) for the currently logged in user in the php backend ( eg in a logic hook )
Can you clarify what you are trying to achieve?
The access token is used to log in and to run APIs from outside the application.
You don't need the access token when you are running APIs from inside the application's controllers, and if you are running php code from inside the logic hook why use an API....
Perhaps with more clarification on what you are trying to achieve we could give some suggestions...
Appreciate your response.
What I am trying to achieve/do is to call one or more REST endpoints from within a logic hook in Sugar.
The logic in those endpoints is not accessible through the bean framework or via logic hooks.
Thus, need to have the ability to call an endpoint and for that, need the token.
I did figure out the answer to my question though, the access_token is nothing but the sessionid (accessed via session_id() function )
Thanks and hope I provided clarity
Retrieving data ...