### Basic Authentication Header Example Source: https://ksefapi.pl/rest-ksef-api-dokumentacja This example demonstrates how to construct the Authorization header for Basic Authentication using an API key ID and key. ```APIDOC ## Basic Authentication ### Description This section details how to authenticate API requests using Basic Authentication. It involves encoding a string composed of your API key ID and API key using Base64 and including it in the `Authorization` header. ### Method HTTP Authentication: Basic Authentication ### Header Construction 1. **Input String**: Concatenate your `key_id` and `key` with a colon in between: `key_id:key`. 2. **Base64 Encoding**: Encode the resulting string using Base64. 3. **Authorization Header**: Prepend `Basic ` to the Base64 encoded string and set it as the value for the `Authorization` header. ### Example **Given:** - `key_id` = `test_id` - `key` = `test_key` **Input String:** ``` test_id:test_key ``` **Base64 Encoded String:** ``` dGVzdF9pZDp0ZXN0X2tleQ== ``` **Authorization Header:** ``` Authorization: Basic dGVzdF9pZDp0ZXN0X2tleQ== ``` ``` -------------------------------- ### Basic Authentication Header Example Source: https://ksefapi.pl/rest-ksef-api-dokumentacja This example demonstrates how to construct the Authorization header for Basic Authentication using your API key ID and key. The input string 'key_id:key' is Base64 encoded. ```text Authorization: Basic dGVzdF9pZDp0ZXN0X2tleQ== ``` -------------------------------- ### Generate Invoice Request URL Source: https://ksefapi.pl/rest-ksef-api-dokumentacja This URL can be used in a web browser to test invoice generation. Replace `test_id` and `test_key` with your actual API credentials. Ensure you have a valid KSeF Client Token. ```text https://test_id:test_key@www.ksefapi.pl/api-test/invoice/generate ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.