Syncano v4 error: "You do not have permission to perform this action"

Using the Python Syncano v4 library, I tried to do the following:

book_class = instance.classes.create(
  name='book',
  schema='[{"name": "title", "type": "string"}, {"name": "author", "type": "string"}]’
)

And got this error:

syncano.exceptions.SyncanoRequestError: 403 You do not have permission to perform this action.

I am currently using an instance API key - what am I doing wrong?

+4
source share
2 answers

403 the answer usually means that you are trying to access the endpoint either with a non-existing key or with the wrong key type.

- api , . , https://api.syncano.io/v1/account/auth/ ( api explorer: http://docs.syncano.com/v0.1/docs/account-log-in, , ).

, syncano:

import syncano
from syncano.models.base import Class

connection = syncano.connect(api_key="ACCOUNT_KEY")

book_class = Class.please.create(
    instance_name='INSTANCE_NAME',
    name='books',
    schema=[
        {"name": "title", "type": "string"},
        {"name": "author", "type": "string"}
    ])

, .

+4

. Syncano . , . ,

+1

Source: https://habr.com/ru/post/1589489/


All Articles