How to push schema to DGrah

I’m trying the following command


curl -X POST https://blue-surf-XXXXXX.us-east-1.aws.cloud.dgraph.io/admin/schema --data-binary '@schema.graphql'

But I get the error:
{"data":null,"errors":[{"message":"Access Denied"}]}

How do I open up my access so that I can push schemas?

You have to have a token to be able to run this command.

How do I get one?

Not sure, I don’t use cloud. I’m an open source supporter hehehe. Let me check in the docs. In general you would use the “Slash API Key”. And it might have a specific name for it in case of cURL. I would recommend you to use Ratel instead. To get a token you just need to send a ADMIN GraphQL login request and you gonna get a new token.

Here we go
https://dgraph.io/docs/cloud/admin/authentication/

Thank you!!