04-27-2026 01:43 - edited 04-27-2026 01:48
04-27-2026 01:43 - edited 04-27-2026 01:48
Hi!
I'm trying to create a subscriber with the following request:
Body:
{
"endpointUri": "MY_WEBHOOK_URL",
"subscriberConfigs": [
{
"dataTypes": ["steps", "weight"],
"subscriptionCreatePolicy": "AUTOMATIC"
}
],
"endpointAuthorization": {
"secret": "Bearer XXX"
}
}
Response:
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}
When testing my access token (https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=XXX) I have the correct scopes:
"scope": "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly",
This endpoit is suppose to require the https://www.googleapis.com/auth/cloud-platform scope that I have, my user is also owner of the project.
Is this a bug or what am I doing wrong?
best regards
Alexander
Answered! Go to the Best Answer.
Best Answeryesterday
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.
yesterday
Hi @shapelink
Thank you for your patience. In the create subscriber endpoint, you need to use the project id instead of the project name in the URL. For example, here is the syntax I used to create a subscriber.
POST {{google_health_v4_host}}/projects/6183080339/subscribers?subscriberId=webhooks
Authorization: Bearer {{access_token}}
Accept: application/json
{
"endpointUri": "<endpoint-URL>",
"subscriberConfigs": [
{
"dataTypes": [
"steps", "weight", "sleep"
],
"subscriptionCreatePolicy": "AUTOMATIC"
}
],
"endpointAuthorization" : {
"secret": "Bearer 618308034039-au5r1vjbnic6pp.apps.googleusercontent.com"
}
}
I'm working on some instructions to put in the documentation to help with creating a subscriber. Let me know what happens after changing the project name to project id.
04-28-2026 13:18
04-28-2026 13:18
@shapelink any update? Were you able to resolve?
Best Answer04-28-2026 23:30
04-28-2026 23:30
No, I have not been able to create a subscriber. I have tested with acess tokens created from both oauth flow and service account.
Best Answer04-29-2026 03:47
04-29-2026 03:47
@GordonFitbit can you have a look at this?
Best Answer05-01-2026 11:44
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-01-2026 11:44
Hi @shapelink
Welcome to the community.
We are currently investigating the issue. I will share more details once I have any updates. Thanks!
Best Answeryesterday
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.
yesterday
Hi @shapelink
Thank you for your patience. In the create subscriber endpoint, you need to use the project id instead of the project name in the URL. For example, here is the syntax I used to create a subscriber.
POST {{google_health_v4_host}}/projects/6183080339/subscribers?subscriberId=webhooks
Authorization: Bearer {{access_token}}
Accept: application/json
{
"endpointUri": "<endpoint-URL>",
"subscriberConfigs": [
{
"dataTypes": [
"steps", "weight", "sleep"
],
"subscriptionCreatePolicy": "AUTOMATIC"
}
],
"endpointAuthorization" : {
"secret": "Bearer 618308034039-au5r1vjbnic6pp.apps.googleusercontent.com"
}
}
I'm working on some instructions to put in the documentation to help with creating a subscriber. Let me know what happens after changing the project name to project id.
14 hours ago
14 hours ago
Replacing the project ID with the project NUMBER worked! It would probably be good to update the documentation and specify that it is the project number that should be used.
Thanks!
Best Answer