# Adding general information about your API ## Authentication information You can add authentication information for your API using the `auth` section in `scribe.php`. Scribe will use this in three places: - Generating an "Authentication" section in your docs - Adding authentication parameters to your rxample requests (for endpoints marked as `authenticated`) - Setting authentication information for response calls. Here's how you'd configure auth with a query parameter named `apiKey`: ```php 'auth' => [ 'enabled' => true, 'in' => 'query', 'name' => 'apiKey', 'use_value' => env('SCRIBE_API_KEY'), 'extra_info' => 'You can retrieve your key by going to settings and clicking Generate API key.', ], ``` If `apiKey` were to be a body parameter, the config would be same. Just set `in` to `'body'`. Here's an example with a bearer token (also applies to basic auth, if you change `in` to `'basic'`): ```php 'auth' => [ 'enabled' => true, 'in' => 'bearer', 'name' => 'hahaha', // <--- This value is ignored for bearer and basic auth 'use_value' => env('SCRIBE_AUTH_KEY'), 'extra_info' => 'You can retrieve your token by visiting your dashboard and clicking Generate API token.', ], ``` And here's an example with a custom header: ```php 'auth' => [ 'enabled' => true, 'in' => 'header', 'name' => 'Api-Key', // <--- The name of the header 'use_value' => env('SCRIBE_AUTH_KEY'), 'extra_info' => 'You can retrieve your token by visiting your dashboard and clicking Generate API token.', ], ``` You can set whatever you want as the `extra_info`. A good idea would be to tell your users where to get their auth key. The `use_value` field is only used by Scribe for response calls. It won't be included in the generated output or examples. For more information, see the [reference documentation on the auth section](config.html#auth). ## Introductory text The `intro_text` key in `scribe.php` is where you can set the text shown to readers in the "Introduction" section. If your text is too long to be put in a config file, you can create a `prepend.md` containing the intro text and put it in the `resources/docs` folder. ## Title You can set the HTML `