This string includes the options used to connect using HTTP header authentication. HTTP header authentication can only be used to authenticate with the S/4HANA sandbox hosted at https://api.sap.com.

Note: The strings shown in this section use the DSN-less format. For additional formats, see Using a connection string.
DRIVER=DataDirect 8.0 SAP S4HANA;HostName=host_name;AuthenticationMethod=25;
AuthHeader=api_key;SecurityToken=security_token;ServiceList=service[,service[,...]];
[attribute=value[;...]];

where:

host_name
specifies the URL of the S/4HANA sandbox instance: https://api.sap.com.
api_key
specifies the name of the HTTP header used to authenticate to the SAP S/4HANA instance.
security_token
specifies the token that is used to authenticate to the SAP S/4HANA instance.
service
(optional) specifies the standard and/or custom service(s) to which the driver connects.
Note: Service List (ServiceList) allows you to limit the services to which the driver connects, thereby eliminating the discovery process and improving performance at connection. In addition, this option provides a method to connect to services not included in your communication scenario.
attribute=value
specifies connection option settings. Multiple option attributes are separated by a semi-colon.
Note: The security token option is not required to be stored in the connection string. It can also be sent separately by the application using the SQLConnect ODBC API. For SQLDriverConnect and SQLBrowseConnect, it will need to be specified in the connection string.

The following example connection string includes the options required for connecting with HTTP header authentication:

DRIVER=DataDirect 8.0 SAP S4HANA;HostName=https://api.sap.com;
AuthenticationMethod=25-HttpHeader;AuthHeader=X-Api-Key;SecurityToken=12a3=bCD/EfGh4Ijk+Lgd8g-44tk31;
ServiceList=API_BUSINESS_PARTNER,API_SALES_ORDER_SRV;