This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to create a REST flow with OAuth2 in OO?

I am unsure on how to create a REST flow with OAuth2 in OO, as the HTTP operations don't seem to have the proper input variables that I need for this.

For OAuth2, I e.g. have the following variables:

  • Ressource Owner Name
  • Ressource Owner Password
  • Client Identification
  • Client Secret
  • Access Token URI

In which operation and in which input-variables would I put all those variables in, so that OO can make a proper REST call using OAuth2?

Is there a sample flow for this somewhere in OO?

I have tried to use the sample flow "Get Auth Token" in Library->Integrations->Micro Focus ->Cloud OS, but I couldn't get it to work.

Any help would be greatly appreciated Slight smile

Tags:

Labels:

RPA
Parents
  • Suggested Answer

    Hi,

    Could you try to send a POST REST request to the specified URL with the following body:

    grant_type=client_credentials&client_id=${LV_clientId}&client_secret=${LV_secret}

    I also had to put following in the header, but I am not sure if this is the end point specific:

    cache-control: no-cache, max-age=0
    pragma: no-cache
    accept: application/json

    Leave authType empty.

    As a result you should get a token.

    Good luck

Reply
  • Suggested Answer

    Hi,

    Could you try to send a POST REST request to the specified URL with the following body:

    grant_type=client_credentials&client_id=${LV_clientId}&client_secret=${LV_secret}

    I also had to put following in the header, but I am not sure if this is the end point specific:

    cache-control: no-cache, max-age=0
    pragma: no-cache
    accept: application/json

    Leave authType empty.

    As a result you should get a token.

    Good luck

Children
  • Unfortunately it did not work, but you have still helped me in showing me as to what variables I have to use for this to work:

    By using just the URL, header and body variables in the HTTP-operations, it should indeed be possible to create a REST flow with OAuth2. I'll see if I can get it to work this way Slight smile

  • Add your credentials in the body to authenticate

    grant_type=password&client_id=${client_id}&client_secret=${client_secret}&username=${admin}&password=${password}

    For me to Snow right Content-Type was application/x-www-form-urlencoded dont know if this is a more general setting.

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button