pgtips
pgtips

Reputation: 1348

REST API & oAuth - How to make call with token and secret?

I am trying to wrap my head around the process of oAuth for a REST API. Using Fiddler, I have been able to construct a request for an access token using oAuth. The request headers are:

Host: api address (removed) Authorization: oauth_consumer_key="removed",oauth_nonce=33460507fa180596e84312805cca2207,oauth_signature_method=HMAC-SHA1,oauth_timestamp=1321303102,oauth_version=1.0,oauth_signature="removed" Accept: application/json Content-type: application/json Content-Length: 26

In the request body I have a username and password which is concatenated and base64 encoded.

The server sends a 200 response and sends me a token and secret along with a person url. How do I use the token and secret in Fiddler to make an API call?

Upvotes: 2

Views: 5431

Answers (1)

Mark S.
Mark S.

Reputation: 4017

The REST request will have the full OAuth header in the Authorization Header and the URL will be the URL of the resource you are requesting. The token and secret are used by that OAuth code to generate the header.

Upvotes: 2

Related Questions