Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

All communication with the GraphQL Cloud API server has to be authorized via an access TOKEN. The valid TOKEN has to be inserted into the header of each API call. A TOKEN can be created by a user with full account access in the cloud IP cam platform.
Using user TOKEN covers most of your integration use cases.

User TOKEN is one of two authorization options. The second option is use OAuth 2.0 .

Authorization header

“Authorization : Bearer TOKEN”

Where TOKEN is created token in the preview step.

You can test CURL in your terminal window. Replace the word TOKEN in the following example with the generated token.

curl -X POST -H 'Authorization: Bearer TOKEN' -H "Content-Type: application/json" --data-binary '{"query":"{cameraList{name}}"}' https://system2.netrex.cz/api/graphql.php

Response:

{"data":{"cameraList":[{"name":"myCamera"}]}

 

For testing purposes you can user our embedded API explorer, Postman or your own GraphQL client application.

TOKEN handling:

Be careful on TOKEN. Be sure what you do. You can update/delete important data on your account.
Do not share with not authentificated persons. Setup your security policy.
Make sure that your application stores TOKEN in secure way.

  • No labels