Create and Update a Data Source in Data Studio via API

Hi everyone, I need to create a Data Source to include data via API (PUT).

I have already enabled all scopes and refreshed the token. Even so, I am getting the following message:

{“status”:“error”,“message”:“The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.”,“correlationId”:“01a0355c-5d25-778a-aaf9-e089139cd5dc”,“links”:{“support”:“https://help.hubspot.com/",“forum”:“https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations”},“category”:"MISSING_SCOPES”}

Can anyone help me out?

Hey @glauber.garcia,

Welcome to the community! :partying_face:

Thanks for sharing the error that you’re running into. The error you’re seeing "The scope needed for this API call isn't available for public use" suggests the Data Studio API endpoint you’re targeting may have restricted access, separate from standard scopes. That said, it looks like this is in beta. Are you able to confirm you’ve joined these two Betas here?

In the meantime, I’ll tag in a few folks from the community to see if they’ve run into this before!

Hey @Alex_Boissonneault, @danielsinewe, @CarolinaDeMares – do you have any experience with these endpoints?

Thanks in advance!

Sam, Community Manager

Hey @glauber.garcia, As suggested by @stassey, this one bites everyone the first time.

“Isn’t available for public use” isn’t a token problem, it’s a portal gating problem. The data_integration.data_source.* scopes are behind those two betas, so refreshing the token does nothing until the portal itself is ungated.

Quick checklist:

  1. Join both betas Sam linked (they’re separate opt-ins) from the same portal your token belongs to, check Product Updates > In Beta to confirm they’re active.
  2. Go back into your private app > Scopes and search for data_integration.data_source. You need all four: file.read, file.write, json.read, json.write. If they don’t show up in the scope picker at all, the portal isn’t ungated yet, that’s your smoking gun.
  3. Re-select the scopes and grab a new token. Refreshing the old one won’t pick up scopes that weren’t attached when it was issued.
  4. Make sure you’re hitting the beta path: /data-studio/data-source/2026-09-beta/{datasourceId}, the PUT on an old/unversioned path throws this exact same error.

One more thing: if you’re using a public OAuth app, switch to a private app token for now, beta scopes often can’t be added to public apps yet.

If the scopes still don’t appear after joining both betas, send HubSpot support your correlationId and ask them to ungate the portal, sometimes the opt-in doesn’t propagate on its own.

Hope it works!

Thank you for the follow-up!!!

I have already signed up for both BETA’s and confirmed that they are available in the product. I also added the permissions and created a new token. However, I am still receiving the same message:

{

"status": "error",

“message”: “The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.”,

“correlationId”: “01a03a1b-c780-74a6-8368-da90e3634087”,

“links”: {

“support”: “https://help.hubspot.com/”,

“forum”: “https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations

},

“category”: “MISSING_SCOPES”

I just realized that I don’t have the .json.read and .json.write scopes.
Under scopes, I only see .file.read and .file.write