Skip to main content

GraphQL Authorization

Getting authorized and obtaining a Session Token

The first real-world usage of the API is creating a new Session Token in order to authenticate subsequent requests and let our services know what data is available to your account.

The playground below has three tabs showcasing the following three steps:

  1. Retrieve a UserInfo object from the AuthQueries.whoami operation without a Session token.

    Executing this request will return an error since the whoami operation expects the executing client to be already authorized.

  2. Log in by sending credentials to the AuthMutations.login operation.

    Note that all data exchanged with DealEngine's GraphQL API is done ONLY via the HTTPS protocol. This way your credentials will never be sent in plain text over the network.

    The result of this operation is a new Session token you can use in subsequent requests, like in step 3.

  3. Retrieve the UserInfo again but this time proving a Session Token

    Once logged in, all other interactions with the API expect you to send a Session Token via the Authorization HTTP header, like this:

Open the HTTP Headers and Query Variables panes and try these three Getting authorized steps.