05-16-2023 23:31
05-16-2023 23:31
Hi Community, I am facing below error while calling subscription API. I have added subscribers endpoint in Application setting.
URL : "https://api.fitbit.com/1/user/-/userRevokedAccess/apiSubscriptions/6462e07f.json"
Reposens :
Best Answer05-17-2023 11:08
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
05-17-2023 11:08
Hi @Web-Api,
Is that the exact syntax that you're executing? I cannot find that call in our logs to investigate further. Can you tell me what scopes this user consented to? Also, do you have a subscriber configured and verified for this application?
Gordon
Best Answer05-17-2023 21:45 - edited 05-17-2023 21:51
05-17-2023 21:45 - edited 05-17-2023 21:51
@Gordon-C I am still getting same error. User has given 3 permission (heartrate, activity, sleep ). configured subscriber endpoint is verified.
Request Curl : curl --location --request POST 'https://api.fitbit.com/1/user/-/userRevokedAccess/apiSubscriptions/2e07f.json' \
--header 'Authorization: Basic *************************'
Response. :
Best Answer06-27-2024 07:05
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
06-27-2024 07:05
Hi @Web-Api
I am going through some old cases and realized we did not come up with a solution for this problem. Are you still getting the insufficient_permissions error?
Looking at your curl request, I see you are missing some headers, and you're using the Basic token instead of the Bearer token. I think your request should look similar to
curl -X POST "https://api.fitbit.com/1/user/-/userRevokedAccess/apiSubscriptions/2e07f.json" \
-H "accept: application/json" \
-H "authorization: Bearer <access_token>" \
-H "content-length: <message_body_size>"
Best Answer