Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid signature #2

Open
Mandlee opened this issue May 21, 2015 · 8 comments
Open

Invalid signature #2

Mandlee opened this issue May 21, 2015 · 8 comments

Comments

@Mandlee
Copy link

Mandlee commented May 21, 2015

Hi!
I try to connect the FatSecret (search) and the response is:

{ "error": {"code": 8, "message": "Invalid signature: oauth_signature 'YcFEXTtpJHILCdjtqAKgskB2WP4='" }}

Do you have any idea what is the problem?

@EugeneHoran
Copy link
Owner

You need to get a personal oauth_signature for your application on the website. @Mandlee did you do that already?

@uzair157
Copy link

where to get personal oauth_signature from the website and where to add it in the code. if by oauth_signature you mean api and secret key then it is already obtained but the error is still there. please help

@uzair157
Copy link

I have solved the issue of { "error": {"code": 8, "message": "Invalid signature: oauth_signature 'YcFEXTtpJHILCdjtqAKgskB2WP4='" }}
for anyone who face the same issue in future, the solution is to add the "&" symbol at the end of the secret key. It is necessary as mentioned in the description of the Fatsecret api on their website.

code example:
APP_SECRET+="&";
SecretKey sk = new SecretKeySpec(APP_SECRET.getBytes(), HMAC_SHA1_ALGORITHM);
APP_SECRET = APP_SECRET.substring(0, APP_SECRET.length()-1);

simply add "&" at the end of secret key before calling SecretKeySpec and remove it right after the call so that "&" doesnt add up on every call to the FatSecretSearch !

Hope it will help !

@ankit-saxena
Copy link

@uzair157 Thank you so much buddy! Just the solution I was looking for. Thanks @EugeneHoran for the repo- really saves a lot of time.

@rohitnandakumar00
Copy link

@uzair157 Thank you! You just saved me countless hours of searching. And like @ankit-saxena said, thank you @EugeneHoran for this repo. Really appreciate it.

@Vindesa
Copy link

Vindesa commented Jul 12, 2016

@EugeneHoran

2

Missing required oauth parameter: oauth_signature_method

getting this error please help me to resolve author signature method is added but it gives error missing

@Vidxyz
Copy link

Vidxyz commented Nov 3, 2016

@EugeneHoran @ankit-saxena Thanks a lot you guys! Literal lifesavers! Literally saved me and im sure so many others multiple hours of taxing work!!

@technodromeltd
Copy link

Having the same problem with "error": {"code": 8, "message": "Invalid signature: oauth_signature 'YcFEXTtpJHILCdjtqAKgskB2WP4='" }}

Added code above and got { "error": {"code": 7, "message": "Invalid/used nonce: oauth_nonce '118111112106120108'" }}

Any help?

Also I was wondering about this line, why it is not counted as instructed

Long.valueOf(System.currentTimeMillis() * 2).toString(), // Should be Long.valueOf(System.currentTimeMillis() / 1000).toString()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants