Wednesday, April 14, 2021

#841 - OIC --> Oracle Hospitality - refreshing OAuth Token

A BIG THANK YOU to Devikiran G. for his support here!

Every OHIP request requires an OAuth token. 






In the previous posts on OHIP and OIC, I was hardcoding the token value in a Lookup -









Note the Authorisation entry - Bearer tokenValue

The token request is as follows - 

Authorisation is Basic Auth - Client_id/ Client_Secret








The response is in the following format - we are interested in the access_token. 














The curl representation is as follows -







So, essentially, I need to replicate this in OIC - 

I begin with the connection - 









URL is set to the OHIP host.

Username / Password set to Client_Id and Client_Secret.

The Integration is as follows - 














I get the token then update the lookup table via the OIC REST API - 









Now to the configuration of GetToken -






Note the Host custom header - will be set to OHIP host.






























The Mapping is similar to the previous examples covered in the Oracle Hospitality Integration posts -










As you can see, I am hardcoding most of the values - these I could, of course, externalise to the lookup.

Now to configuring the updateLookup Invoke -



























name will be set to the Lookup name.























The Mapping reflects the structure of the Lookup -












2 columns - name and value. Then the rows with the name value pairs.

Activate and test -

Here is the Lookup pre-test -


























Lookup post-test - 









Sanity test of an api that leverages the lookup -














All that's needed now is to schedule the integration e.g. run every 30 minutes.





No comments:

Post a Comment