‎2018 Mar 06 1:06 PM
Hi experts,
I am new to the OAuth2 and Autodesk Forge API.
I am starting to learn about how to integrate both, for now I am stuck on how to make an http post from ABAP code to the authentication endpoint of the Forge API to get the access token. I started looking at this link https://wiki.scn.sap.com/wiki/display/Security/OAuth+2.0+-+Integrating+access+protected+web+services... but I can't get the whole picture if that's what I really need.
Specifically I need help on how can I do the equivalent of the following call using curl (as it come in this link https://developer.autodesk.com/en/docs/oauth/v2/tutorials/get-2-legged-token/):
curl -v 'https://developer.api.autodesk.com/authentication/v1/authenticate'
-X 'POST'
-H 'Content-Type: application/x-www-form-urlencoded'
-d '
client_id=obQDn8P0GanGFQha4ngKKVWcxwyvFAGE&
client_secret=eUruM8HRyc7BAQ1e&
grant_type=client_credentials&
scope=data:read
Spaces in the call are put for readability purpose.
Any help or insights are appreciated.
‎2019 Dec 18 9:44 AM
First you need to retrieve a IF_HTTP_CLIENT-Instance with the factory-methods in the class CL_HTTP_CLIENT.
With this instance you create an instance of class CL_REST_HTTP_CLIENT and set the request-body in method IF_REST_RESOURCE~POST
‎2019 Dec 18 9:53 AM
EDIT: johannes_gerbershagen11 it is year old question...