# Accessing graphQL at C&B Systemer

**URL:** <https://developerforum.realequity.dk/t/accessing-graphql-at-c-b-systemer/1964>\
**Category:** Website advertising\
**Tags:** docs\
**Created:** [December 2, 2024, 9:19am UTC](https://developerforum.realequity.dk/t/accessing-graphql-at-c-b-systemer/1964 "2024-12-02T09:19:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soren.fisker](https://dub1.discourse-cdn.com/flex013/user_avatar/developerforum.realequity.dk/soren.fisker/32/3107_2.png) [@soren.fisker](https://developerforum.realequity.dk/u/soren.fisker)\
**Post date:** [December 2, 2024, 9:19am UTC](https://developerforum.realequity.dk/t/accessing-graphql-at-c-b-systemer/1964/1 "2024-12-02T09:19:06Z")

</div>

## Access token

In order access the RealEquity graphQL you need to identify yourself with a bearer token.

How to generate a token is described in these documents:

- [Authentication](https://api.prod.realequity.dk/public_v2/index.html#tag/Authentication)
- [Getting auth tokens](https://developerforum.realequity.dk/t/getting-auth-tokens/153)

You’ll need this additional information to be able to generate your token

- Identity server URL is: [https://identity.prod.realequity.dk/connect/token](https://identity.prod.realequity.dk/connect/token)
- _resourceGroupId_ identifying the chain or store you’re fething data for (provided by C&B)
- _client\_id_ (provided by C&B and identifies you as a partner)
- _client\_secret_ (provided by C&B))

> ❗ _Please note that client\_id and client\_secret is highly confidential information and should be treated in your organization as such._

## graphQL GUI

RealEquity graphQL is accessed here: [https://graphql.prod.realequity.dk/graphql](https://graphql.prod.realequity.dk/graphql)

The first time you access the graphQL GUI, you should click “Create Document”:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/realequity/original/2X/1/1b2799f62bea1f6e6ad69d66482ef5e490d299a4.png)

Having done that, you need to create a HTTP Header as shown here:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/realequity/original/2X/7/77d57ea76a25a5ce9b9c9154e120674625f07306.png)

By writing the phrase “query {}” in the request column on the ‘Operation’ tab, you can invoke the Builder, which can be usefull to toggle on.

> **Toggling the Builder**
>
> You toggle the Builder by clicking the treeview ikon to the left of the ‘Request’ headline.
> 
> _Builder toggled off_
> 
> ![builder_toggled_off](https://europe1.discourse-cdn.com/flex013/uploads/realequity/original/2X/a/a3edbc515134b9f8a59f6871ca531f7b2e2e33eb.png)  
> _Builder toggled on_  
> ![builder_toggled_on](https://europe1.discourse-cdn.com/flex013/uploads/realequity/original/2X/5/524402f69a7e6e98a7b393ab396ca42c97a3a7dd.png)

### Restricted access

Your access is restricted to fractions prefixed with “distribution”

## Converting a graphQL query to at API request payload

If you’re using Google Chrome as your webbrowser you can get the converted request from the F12 developer tool by finding the graphQL request under ‘network’.

If you prefer a manuel conversion..

- substitute visible line breaks with `\r\n`
- escape double quotes with a leading backslash `\"`

### API endpoint

The graphQL request payload should be postet to: [https://graphql.prod.realequity.dk/graphql](https://graphql.prod.realequity.dk/graphql/)  
Remember to include your bearer token in the request header.
