Error calling API Settings in App

I’m testing a dynatrace App in React. I’ve a hook that is calling Settings API through TypeScript SDK as you can see on the code snippet:

try {      var config = {“schemaIds”:“builtin:alerting.maintenance-window”,                    “scopes”:“environment”}      const response = await settingsObjectsClient.getSettingsObjects(config);      console.log(response);…    } catch (e) {…    }But I get the following error in the browser:SyntaxError: Unexpected token ‘O’, “OAuth token”… is not valid JSON
at JSON.parse (<anonymous>)
at fetchQuery (http://localhost:3002/ui/main.js:123265:36)And  in the console I have this message:Request failed: {“code”:403,“message”:“OAuth token is missing required scope. Use one of: [settings:objects:read]”}I’ve executed the same code in a notebook and there was no problem. So It seams that when I call the same API from React APP, the typescript SDK is not passing the login user authorization token.

Hi @joseafcampos ,

to access the Settings API from your app, you need to add the scope settings:objects:read to your app config file. You can find the instructions at Add permission scopes to use Dynatrace APIs | Dynatrace Developer

Thank you, that fixed the problem.