Postman SDK customization options

View as Markdown

The customizations section of the postman-sdk.config.json file is used to customize your SDKs.

authentication

The authentication options allow you to configure the authentication that your API uses, that’s set using the auth options.

This is an object with the following options:

OptionTypeDescription
accessobjectCustom access token authentication options.
apiKeyobjectAPI key authentication options.

access

The access options allow you to configure the custom access token that’s sent to your API when the auth option has a custom prefix.

This is an object with the following options:

OptionTypeDescription
prefixstringThe prefix to use for the custom access token authentication.

prefix

The prefix is used to define a custom prefix when using an access token. By default, when using custom access token authentication, the Authorization header is passed as Bearer <token>.

For example, if your bearer token is Passw0rd123!, the header would be:

HeaderValue
AuthorizationBearer Passw0rd123!

By setting the prefix, you can replace Bearer with the value of your choice.

For example, if you have the following:

1{
2 ...
3 "auth": [
4 "custom"
5 ],
6 "customizations": {
7 "authentication": {
8 "access": {
9 "prefix": "Token"
10 }
11 }
12 }
13 ...
14}

Then, the header would be:

HeaderValue
AuthorizationToken Passw0rd123!

apiKey

The apiKey option is used to configure the API key authentication for the SDKs. This is used if the auth setting is set to apikey.

This is an object with the following options:

OptionTypeDefaultDescription
headerstringX-API-KEYCustom access token authentication options.

The header option sets the header to use for the API key authentication. This is used by the SDKs to set the header when making requests to the API.

For example, if you have the following:

1{
2 ...
3 "customizations": {
4 "authentication": {
5 "apiKey": {
6 "header":"MY_CUSTOM_APIKEY_HEADER"
7 }
8 }
9 }
10 ...
11}

Then, the API key will be passed to your API using the MY_CUSTOM_APIKEY_HEADER header.

If this isn’t set, then API keys by default are passed using the X-API-KEY header.