Jira oauth error signature length not correct


Currently iam developing a little Jira notification tool in C# for Jira events that i can configure in my tool. To get the information from jira i contact the rest api.

In the first step i implemented basic authentication. so i have to send the users credentials als base64 with each request to rest api. Thats working perfectly.

To make it a bit more safe i would like to implement oauth.

I have never used oauth before and i have a little problem with constructing the request.

In first step i want to ask for a request token.

So i created a basestring with the encodedurl and the oauthparameters.

Like this:


Here iam using consumer key, signature method, timestamp, nonce and callback, but i also tried combos without callback and with oauth_version.

With this example i created rsa-sha1 signature using the bouncycastle library.
My authorization header looks like this: (i used public and private key from the example you can find here
Now my authorization header looks like this:

Authorization: OAuth oauth_consumer_key="hardcodedtestkey", oauth_signature_method="RSA-SHA1", oauth_timestamp="1496215211", oauth_nonce="NjM2MzE4MTkyMTE2MjY0ODMw", oauth_callback="oob", oauth_signature="HtlcgkFjR24obsW6yUAV9czhUelq1/htBaJjxjeNEKx1H+I6aYOYXgthHBt8/NDtqWHi+KHoa1nV7raWoVMMGz6kwSqZ3q+66ULN1YBRmxHRiXwsDllqZOkgjwG3bbxjtWBpmWrouXbsUNk/sQwZ/XG7h0oljcLFltwAzTsHp6E="


When calling the request token url i get error 500 and logs say "signature length not correct" got 127 expecting 128.

Do you have any idea what iam missing or doing wrong?
Iam right with the oauth-parameter for version being optional? tried with it but still getting same error.
i appreciate your help!

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

112 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you