Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

REST API using BasicwithHMAC authtype

jdoma
Regular Contributor
Regular Contributor

Hi Forum,

We are trying to consume API services using authtype as BasicWithHMAC via RESTconnector and referred below article.

https://saviynt.freshdesk.com/support/solutions/articles/43000521736-rest-connector-guide

And the connection json is as below (replaced api key and secret).

We have two different key-secret, one with Basic auth and other with HMAC enabled. And when we use Basic key-pair and authtype as Basic, it is working fine. And when we use BasicWithHMAC, both key-secrets are throwing invalid credential error. However, it is working fine via Postman. Anyone here implemented/experienced with BasicWithHMAC, your guidence will be much helpful. Thanks.

{
"authentications": {
"acctAuth": {
"authType": "BasicWithHmac",
"url": "https://api.messagemedia.com/v1/messages",
"httpMethod": "POST",
"properties": {
"IKEY": "API-KEY",
"SKEY": "API-SECRET"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken"
],
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "Basic API-KEY"
}
}
}

5 REPLIES 5

jdoma
Regular Contributor
Regular Contributor

Anyone had similar issue and fixed, any leads would be a great help.

Http error codes are missings


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

jdoma
Regular Contributor
Regular Contributor

Hi Rushikesh,

I have constructed by referring the below sample given under REST connector guide

{
  "authentications": {
    "acctAuth": {
      "authType": "BasicWithHmac",
      "url": "<url>",
      "httpMethod": "POST",
      "properties": {
        "IKEY": "<<IKEY>>",
        "SKEY": "<<SKEY>>"
      },
      "authError": [
        "InvalidAuthenticationToken",
        "AuthenticationFailed",
        "Authentication_MissingOrMalformed",
        "Authentication_ExpiredToken"
      ],
      "errorPath": "error.code",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "access_token",
      "tokenType": "Basic",
      "accessToken": "Basic xyz"
    }
  }
}

https://saviynt.freshdesk.com/support/solutions/articles/43000521736-rest-connector-guide

Refer https://docs.saviyntcloud.com/bundle/REST-v2022x/page/Content/Developers-Handbook.htm


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

jdoma
Regular Contributor
Regular Contributor

Yes Rushikesh, we have referred the same while constructing the JSON but still getting authentication failed error message