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?...
  • j_angelevski's avatar
    3 years ago

    @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))