{
  "info": {
    "_postman_id": "32ef960c-1660-46e4-85eb-9e1663763713",
    "name": "DocCheck Access - OAuth2",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "46878651",
    "_collection_link": "https://markushaberl.postman.co/workspace/40f09206-c8be-46ab-8c29-db55e0a78066/collection/46878651-32ef960c-1660-46e4-85eb-9e1663763713?action=share&source=collection_link&creator=46878651"
  },
  "item": [
    {
      "name": "Auth",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "https://auth.doccheck.com/en/authorize?client_id={{client_id}}&grant_type=authorization_code&response_type=code&modal=0&redirect_uri={{redirect_uri}}&scope={{scopes}}&state={{state}}",
          "protocol": "https",
          "host": [
            "auth",
            "doccheck",
            "com"
          ],
          "path": [
            "en",
            "authorize"
          ],
          "query": [
            {
              "key": "client_id",
              "value": "{{client_id}}"
            },
            {
              "key": "grant_type",
              "value": "authorization_code"
            },
            {
              "key": "response_type",
              "value": "code"
            },
            {
              "key": "modal",
              "value": "0"
            },
            {
              "key": "redirect_uri",
              "value": "{{redirect_uri}}"
            },
            {
              "key": "scope",
              "value": "{{scopes}}",
              "description": "Scopes je nach Lizenzmodell wählen. Leer = keine Scopes werden im Login abgefragt und stehen nicht am Userdaten-Endpunkt bereit. Basic: deaktivieren/nicht senden."
            },
            {
              "key": "state",
              "value": "{{state}}",
              "description": "Nur Economy/Business. In Basic nicht senden (deaktivieren)."
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Token",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            {
              "key": "client_id",
              "value": "{{client_id}}",
              "type": "text"
            },
            {
              "key": "client_secret",
              "value": "{{client_secret}}",
              "type": "text"
            },
            {
              "key": "grant_type",
              "value": "authorization_code",
              "type": "text"
            },
            {
              "key": "code",
              "value": "{{auth_code}}",
              "type": "text"
            },
            {
              "key": "redirect_uri",
              "value": "{{redirect_uri}}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "https://auth.doccheck.com/token",
          "protocol": "https",
          "host": [
            "auth",
            "doccheck",
            "com"
          ],
          "path": [
            "token"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Userdata",
      "request": {
        "auth": {
          "type": "oauth2",
          "oauth2": [
            {
              "key": "accessTokenUrl",
              "value": "{{token_url}}",
              "type": "string"
            },
            {
              "key": "authUrl",
              "value": "{{auth_url}}",
              "type": "string"
            },
            {
              "key": "clientId",
              "value": "",
              "type": "string"
            },
            {
              "key": "clientSecret",
              "value": "",
              "type": "string"
            },
            {
              "key": "addTokenTo",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [],
        "url": {
          "raw": "https://auth.doccheck.com/api/users/data",
          "protocol": "https",
          "host": [
            "auth",
            "doccheck",
            "com"
          ],
          "path": [
            "api",
            "users",
            "data"
          ]
        }
      },
      "response": []
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {

        },
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {

        },
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "client_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "client_secret",
      "value": "",
      "type": "string"
    },
    {
      "key": "redirect_uri",
      "value": "",
      "type": "string"
    },
    {
      "key": "scopes",
      "value": "",
      "type": "string",
      "description": "Scopes je nach Lizenzmodell wählen. Leer = keine Scopes im Login abgefragt; entsprechend keine zusätzlichen Daten am Userdaten-Endpunkt. Basic: nicht senden."
    },
    {
      "key": "state",
      "value": "",
      "type": "string",
      "description": "CSRF-Schutz. Nur Economy/Business verwenden; in Basic nicht senden."
    },
    {
      "key": "auth_code",
      "value": "",
      "type": "string"
    },
    {
      "key": "auth_url",
      "value": "https://auth.doccheck.com/en/authorize?",
      "type": "string"
    },
    {
      "key": "token_url",
      "value": "https://auth.doccheck.com/token",
      "type": "string"
    },
    {
      "key": "user_data_url",
      "value": "https://auth.doccheck.com/api/users/data",
      "type": "string"
    }
  ]
}
