HypSetCustomHeader
Describes the Oracle Smart View for Office VBA function, HypSetCustomHeader.
Cloud data provider types: Oracle Essbase cloud, Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting
Description
Add custom HTTP headers using this function. Once set, all requests made by Smart View will include this header as part of the request.
This function may be used for signing on to providers that use the OAuth 2.0 token for authentication, such as Planning or Oracle Essbase cloud.
For example, with Essbase cloud, users can generate an OAuth bearer token by connecting to Oracle Identity Services Cloud and providing necessary information (Client ID, Client Secret, etc.). Once the token is generated, this token can be added to the header.
The HypCustomHeader function also supports Basic Authentication via Oracle Fusion Cloud Enterprise Performance Management for Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting.
Syntax
HypSetCustomHeader Lib "HsAddin" (vtHeader) As Long
ByVal vtHeader As Variant
Parameters
vtHeader: Content of this parameter will be added to existing HTTP headers. Parameter content must conform to HTTP header semantics. This parameter can then be added to the authorization header. See the Example - OAuth and Example - Basic Authentication for more information.
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Example - OAuth
Public Declare PtrSafe Function HypSetCustomHeader Lib "HsAddin" (ByVal vtHeader As Variant) As Long
AuthHeader = "Authorization: Bearer " + token sts = HypSetCustomHeader(AuthHeader)
Example - Basic Authentication
The HypCustomHeader function also supports Basic Authentication in the format, /HyperionPlanning/rest/SmartView
. In this example, the token is a Base64 Encoded String.
Public Declare PtrSafe Function HypSetCustomHeader Lib "HsAddin" (ByVal vtHeader As Variant) As Long
AuthHeader = "Authorization: Basic " + token sts = HypSetCustomHeader(AuthHeader)