0

I have this command that runs from command line perfectly, and I need to transform it into PHP curl and get headers for response. What it would look like?

curl -X POST -i -H 'Authorization: OAuth oauth_consumer_key="abcdrsldkfj", oauth_nonce="somerandom", oauth_signature="generatedsignature", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1456967973", oauth_version="1.0"' https://api.fitbit.com/oauth/request_token

I tried to use a few libraries to authenticate with FitBit but no luck so far. Trying to use plain curl for authentication.

George Mylonas
  • 704
  • 6
  • 16
  • There are some PHP libraries for working with fitbit and doing OAuth worth looking at [here](https://packagist.org/search/?tags=fitbit) – drew010 Mar 03 '16 at 04:51
  • This request is using the Fitbit OAuth 1.0a API which will be removed in [just over a month](http://stackoverflow.com/questions/35761623/command-line-curl-to-php-curl-for-fitbit). Have a look at their [OAuth 2.0](https://dev.fitbit.com/docs/oauth2/) spec. – John C Mar 03 '16 at 23:12

0 Answers0