Skip to main content
1-Visitor
June 30, 2017
Question

OAuth2 authorization code

  • June 30, 2017
  • 1 reply
  • 3247 views

Hi All,

I have to consume an external API which implement OAuth2.0 autorization code flow to grant consent and access data.

Do you know how to do that ?

Do you know where I can found documentation ?

Best regards

1 reply

1-Visitor
June 30, 2017

Check out the new TWX 8 SSO functionality using PingFederate. You can get more info in the TWX help and TWX 8 Technical training content.

sloison1-VisitorAuthor
1-Visitor
July 3, 2017

Hi,

Thanks for information.

If I well understand this is a new fonctionality provided in TWX 8 in order to do SSO through OAuth2 and PingFederate.

Actually my need is just to use the OAuth2 protocol (authorization code flow) in order to access an external API (for data exchange)

Do you know if some piece of code is reusable from the PingFederate integration (the part which concern OAuth2) ?

Do you know if TWX7 is able to do the same ?

Best Regards

Stéphane

1-Visitor
July 3, 2017

Ok...So if that's the case, you should be able to do everything you need just using services and REST calls.   When I was first learning TWX, I wrote a series of services that allowed me to connect to my Ecobee thermostats.  I did this creating a thing with a service that obtained the OAuth2 token by building up the REST request and submitting it to their API.  Once I had the token, I stored it as a property on the thing and then used that token to continue to make API calls.  I don't have that code anymore or I'd happily share it, but creating the REST request to obtain the token is the first step.  Then you'll just have to pass the token in the header of all the API calls for whatever system you're trying to access.