Reverse Auth request token error


#1

There have been a few discussions about Reverse Auth problems but none of the threads present a solution.

The other threads are:
https://dev.twitter.com/discussions/4789
https://dev.twitter.com/discussions/4917
https://dev.twitter.com/discussions/4954

My app has Reverse Auth enabled and step 1 of the process (obtaining the request token) succeeds. Using the code sample in https://dev.twitter.com/docs/ios/using-reverse-auth to obtain the Access Token the request returns a status code 400 and the following error:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error code="101">Reverse auth credentials are invalid</error>
</errors>

Any idea what the error code represents? Since a few people have had this same issue is there a known solution?

Thanks


#2

Hi Mark,

Let’s see if we can resolve your issue. For reference, I have an example app at https://github.com/seancook/TWiOS5ReverseAuthExample that tries to walk through the process as simply as possible.

Common things that I’ve seen from developers who’ve experienced problems with Reverse Auth:

  1. Does Step 1 result in what looks like a full OAuth header? It should not look like a regular request token.
  2. Are you using TWRequest to POST Step 2 to /oauth/access_token? Are you passing the x_auth_* parameters in a dictionary to the request before POST’ing?
  3. Are you setting the x_reverse_auth_parameters to the full value that was returned in Step 1? (This is labeled “S” in the documentation)

Please let me know if you’re still seeing problems. We’ll get it resolved.

-Sean


#3

So the answers to all 3 questions are done correctly. We found the problem was that request token request was a GET instead of a POST. It still returned what looks like a valid OAuth signature for use in step 2. Using a POST for step 1 fixed the issue.