Connecting to Your GraphQL
SERVER corresponds to your own.
https://SERVER.api.sellercloud.com/gql/swagger endpoint you can use the SwaggerUI to query the API directly. Remember to replace
SERVER with the name of your own server.
In order to be able to poll the endpoint you need to be authorized.
If you are using Swagger, expand the
/token section and click on the Try it Out button to the right. In the text box, type in a valid username and password combination and click EXECUTE. If your credentials are valid you will see a response similar to the following:
Copy the value of the
Click on the Authorize button at the top right of the page and in the input box type in
Bearer (with a trailing space) and then paste the token from above. Click Authorize and you should see an "Authorized" message. Close the box and you can now send GraphQL queries to the
Similarly to Swagger, you first need to make a request to the
/token API and obtain the
access_token. Then in each request to the
/graphql endpoint you need to include an Authorization header:
Authorization: Bearer ACCESS_TOKEN_HERE
You can view sample code snippets here.