OAuth1 authentication doesn’t work very well in HTTP Request activity. It does not generate a signature I have found a way around this that is quite easy to implement into your code. I wrote a short tutorial below about how to do this without using something like python or writing your own signature generator:
- Go to Package manager and search for OAuth.DotNetCore
(Make sure that nuget.org is enabled under the settings, if not you won’t see the nuget.org option)
- define a new variable with type OAuthRequest and create assign with the following info:
New OAuth.OAuthRequest With{
.Method = "GET",
.Type = OAuth.OAuthRequestType.RequestToken,
.SignatureMethod = OAuth.OAuthSignatureMethod.HmacSha1,
.ConsumerKey = str_ConsumerKey,
.ConsumerSecret = str_ConsumerSecret,
.Token = str_AccessToken,
.TokenSecret = str_TokenSecret,
.RequestUrl = in_Str_APIEndpoint,
.Version = str_OAuthVersion
}
You can change the SignatureMethod according to your use case, mine was HMACSHA1.
- Now add the HTTP Request Activity and enter the following info in the case authorization is done by header:
If in your case the authorization is not done by header you will have to change that.
Edit 1:
I had some more problems with query parameters that contained square brackets. Since that the square brackets are reserved for IPV6. The Square have to be double encoded to be used in query params:
[ => %5B => %255B
] => %5D => %255D