Forum Discussion

clinton_hemmant's avatar
clinton_hemmant
New Contributor III
2 years ago
Solved

REST Oauth2 Account - Can I send a base 64 encoded header value

Hi

I need to use Oauth2 to authenticate to a REST API - part of the POST request to obtain the token is an Authorization header encoded in Base64 - is it possible to do this with SnapLogic Accounts?

I also need to send parameters in a body as part of the same POST request - is this possible using SnapLogic Accounts?

Regards

Clinton

  • @ykoppisetty

    It is because the parse method expects a number but you are providing a string value.
    You need to parse the “Modified_Date”, you can do so by using parseInt(string).

    In your case would be:

    parseInt($Modified_Date)
    

    And the full expression to format the date would be:

    Date.parse(parseInt($Modified_Date))
    

1 Reply

  • I found out it is possible to do this with a REST OAuth2 Account: 

    Select the 'Send Client Date as Basic Auth Header' check box

    Select the 'Header authenticated' check box