--- sidebar_label: 'Example: Your first request' sidebar_position: 6 --- # Example: Your first request This walkthrough shows you how to obtain a JWT token and make your first authenticated request to the Future Ordering API. :::note You need the following information before you start: - your tenant ID, - a client ID and secret, and - a list of scopes relevant for your request. See [Obtaining an API Client](obtaining-a-client.md) for more information. ::: 1. Replace the placeholder values in the curl command below with your credentials and run it to retrieve a JWT token. ```bash curl -L -X POST 'https://.login-test.futureordering.com/connect/token' \ -H 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_secret=' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'client_id=' \ --data-urlencode 'scope=' ``` A successful response looks like this: ```json { "access_token": "eyJhbGciOiJSU[...]", "expires_in": 3600, "token_type": "Bearer", "scope": "" } ``` 2. Use the `access_token` to make requests to the Future Ordering API. Include the following required headers in every request: | Header | Value | Description | | --- | --- | --- | | `Authorization` | `Bearer ` | Auth scheme must be `Bearer`. | | `Content-Type` | `application/json` | Required for requests with a body (POST, PUT, PATCH). The Future Ordering API accepts and returns JSON only. | | `X-Api-Version` | `0` | Future Ordering versions its APIs using this header. The API rejects requests that omit this header. | **Example** — *retrieve all configurations*: ```bash curl -X GET "https://api.futureordering.com/entities/configurations/values?complete=true" \ -H 'X-Api-Version: 0' \ -H 'Authorization: Bearer eyJhbGciOiJSU[...]' ``` A `200` response confirms your integration is set up correctly.