Authentication

95 views
Skip to first unread message

Len

unread,
Feb 5, 2012, 5:47:28 PM2/5/12
to FatSecret Platform API
Useful developer post:
------------------------------------------------------

In the last couple of days I've been trying to authenticate with your
REST API using Objective-C. I kept getting the "Invalid signature"
response. I just discovered that the reason was that I url-encoded the
signature myself before sending it as a parameter. Then the framework
I used to send the Http Request encoded it again. I believe the part
that confused me was in the bottom part of the "Authentication"
section in the REST API guide. It says there: "The calculated digest
octet string, first base64-encoded per [RFC2045], then escaped using
the [RFC3986] percent-encoding (%xx) mechanism is the
oauth_signature.". I think that a small clarification in that part
(which says the encoding isn't necessary if it is being done by a
framework of some kind) can save a lot of time for many people

hubiedoo517

unread,
Feb 5, 2012, 11:26:26 PM2/5/12
to FatSecret Platform API
I'm also using Objective C and I seem to get the invalid_signature
only when there is a space in the signature. Have you run into this at
all. I tried using many different encoding escapes but I can't seem to
get the response back every time. Which framework did you use to send
the request is a 3rd party framework, if you don't mind me asking? I'm
just using Objective C native frameworks, NSURLRequest and
NSURLConnection.
Reply all
Reply to author
Forward
0 new messages