CWMoo (Customer) asked a question.

How to configure RESTful Web Service AFX connector based on OAuth2 authorization_code grant type?

There are two steps involved via manual process

Step 1 - generate a code via any browser as follow.

https://<INSTANCE_DOMAIN>/oauth2/authorizations/new?client_id=<CLIENT_ID>&response_type=code&scope=<SPACE_SEPARATED_LIST_OF_SCOPES>&redirect_uri=<REDIRECT_URI>

 

Step 2 - run the following command via Postman to generate a token

https://<INSTANCE_DOMAIN>/oauth2/token?client_id=<CLIENT_ID>&grant_type=authorization_code&code =<using the code generated via step 1>&scope=<SPACE_SEPARATED_LIST_OF_SCOPES>&redirect_uri=<REDIRECT_URI>

 

How do we configure RESTful AFX connector based on the above steps?

 

We couldn't find any documentation describes how to configure RESTful AFX connector using OAuth2 authorization_code grant type.

 

Thanks.


  • what version are you using?

    Can you share the name of the application you are trying to configure? Maybe others have already experience with this app.

  • CWMoo (Customer)

    I'm using version 7.5.2.183307 P05 

     

    The application name is Coupa.

     

    Here's the connection details in the AFX connector. Additional parameters were added such as grant_type, scope, redirect_uri and etc.

     

    Coupa REST AFX ConnectorWhen clicking on 'Proceed for Authorization', it redirects to Coupa authorization page.Coupa permissions pageWe encountered some error after clicking 'Allow' on the authorization page.

    Bad Request 

    The AFX log did not provide any information for such event even though 'debug' mode was enabled.

     

    Thanks!

    Expand Post
    • Can you check if there is anything recorded in aveksaServer.log during your test?

      If yes, enable specific Oauth2 classes for debug and run the test again.

       

      Are you using Generic REST collector to collect accounts and app roles from Coupa?

  • CWMoo (Customer)

    I couldn't find anything recorded in aveksaServer.log during my test.

     

    yes, I'm using Generic REST collector to collect accounts and app roles from Coupa. No issue with collector since it supports client_credentials grant type. The AFX connector is tricky and difficult to get it worked.