squidex: can't create schema content via api client (err: forbidden)

Hi, I’m trying to create a schema via the api on cloud.squidex.io –

I created a client in app (nathantestapp), and got a token with:

            {
                "grant_type": "client_credentials",
                "client_id": "<client_id>",
                "client_secret": "<client_secret>",
                "scope": "squidex-api"
            }

I tested the validity of token by requesting a list of schemas in my app(returned the list as expected), and then tried to create a schema with a field by posting to https://cloud.squidex.io/api/apps/nathantestapp/schemas with the following:

{
  "Name": "apicreate",
  "Properties": {
    "Label": null,
    "Hints": null
  },
  "Fields": [
    {
      "Name": "testAddField",
      "IsHidden": false,
      "IsLocked": false,
      "IsDisabled": false,
      "Partitioning": null,
      "Properties": {
        "fieldType": "Boolean",
        "DefaultValue": null,
        "Editor": "Checkbox",
        "Label": null,
        "Hints": null,
        "Placeholder": null,
        "IsRequired": false,
        "IsListField": false,
        "Partitioning": null
      }
    }
  ]
}

and the response is forbidden/empty string – am I requesting the wrong scope initially?

edit: this is what I’m referencing: https://cloud.squidex.io/api/content/nathantestapp/docs#section/Authentication

Thanks, Nathan

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (25 by maintainers)

Most upvoted comments

So much stress after 8 hours of travelling around šŸ˜„

The wrong one … does not matter. I was shocked, becuase I thought there is a bug šŸ˜„