11-10-2014 03:36
11-10-2014 03:36
I'm using the following php code to send a friend request
$apiCall = 'https://api.fitbit.com/1'; $client = new Client($apiCall); $oauth = new OauthPlugin(array( 'consumer_key' => $conskey, 'consumer_secret' => $conssec, 'token' => $apis->getToken(), 'token_secret' => $apis->getTokenSecret() )); $result=$client->addSubscriber($oauth); // /1/user/-/friends/invitations.xml $send=$result->post('user/-/friends/invitations.xml',null , array('invitedUserId' => $friendid)); $data = $send->send();
but I get the error -
Client error response
[status code] 403
[reason phrase] Forbidden
[url] https://api.fitbit.com/1/user/-/friends/invitations.xml
06-10-2015 15:50
06-10-2015 15:50
Thank you for your participation in the Community @Gavino! Can please be so kind to clarify a bit the inconvenience you're having.
Looking forward to your reply!
06-10-2015 16:01
06-10-2015 16:01
@Gavino: Could you please post the actual HTTP request that you're making? If your HTTP client doesn't have verbose logging, you could use a tool like http://requestb.in/