File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,8 @@ namespace Example
333333 {
334334 Configuration config = new Configuration ();
335335 config .BasePath = " https://api.sandbox.immutable.com" ;
336+ // Configure Bearer token for authorization: BearerAuthWithClient
337+ config .AccessToken = " YOUR_BEARER_TOKEN" ;
336338 // Configure API key authorization: ImmutableApiKey
337339 config .AddApiKey (" x-immutable-api-key" , " YOUR_API_KEY" );
338340 // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
@@ -396,7 +398,7 @@ catch (ApiException e)
396398
397399### Authorization
398400
399- [ ImmutableApiKey] ( ../README.md#ImmutableApiKey ) , [ BearerAuth] ( ../README.md#BearerAuth )
401+ [ BearerAuthWithClient ] ( ../README.md#BearerAuthWithClient ) , [ ImmutableApiKey] ( ../README.md#ImmutableApiKey ) , [ BearerAuth] ( ../README.md#BearerAuth )
400402
401403### HTTP request headers
402404
Original file line number Diff line number Diff line change @@ -947,6 +947,12 @@ public Immutable.Api.ZkEvm.Client.ApiResponse<RefreshCollectionMetadataResult> R
947947 localVarRequestOptions . PathParameters . Add ( "chain_name" , Immutable . Api . ZkEvm . Client . ClientUtils . ParameterToString ( chainName ) ) ; // path parameter
948948 localVarRequestOptions . Data = refreshCollectionMetadataRequest ;
949949
950+ // authentication (BearerAuthWithClient) required
951+ // bearer authentication required
952+ if ( ! string . IsNullOrEmpty ( this . Configuration . AccessToken ) && ! localVarRequestOptions . HeaderParameters . ContainsKey ( "Authorization" ) )
953+ {
954+ localVarRequestOptions . HeaderParameters . Add ( "Authorization" , "Bearer " + this . Configuration . AccessToken ) ;
955+ }
950956 // authentication (ImmutableApiKey) required
951957 if ( ! string . IsNullOrEmpty ( this . Configuration . GetApiKeyWithPrefix ( "x-immutable-api-key" ) ) )
952958 {
@@ -1037,6 +1043,12 @@ public Immutable.Api.ZkEvm.Client.ApiResponse<RefreshCollectionMetadataResult> R
10371043 localVarRequestOptions . PathParameters . Add ( "chain_name" , Immutable . Api . ZkEvm . Client . ClientUtils . ParameterToString ( chainName ) ) ; // path parameter
10381044 localVarRequestOptions . Data = refreshCollectionMetadataRequest ;
10391045
1046+ // authentication (BearerAuthWithClient) required
1047+ // bearer authentication required
1048+ if ( ! string . IsNullOrEmpty ( this . Configuration . AccessToken ) && ! localVarRequestOptions . HeaderParameters . ContainsKey ( "Authorization" ) )
1049+ {
1050+ localVarRequestOptions . HeaderParameters . Add ( "Authorization" , "Bearer " + this . Configuration . AccessToken ) ;
1051+ }
10401052 // authentication (ImmutableApiKey) required
10411053 if ( ! string . IsNullOrEmpty ( this . Configuration . GetApiKeyWithPrefix ( "x-immutable-api-key" ) ) )
10421054 {
Original file line number Diff line number Diff line change @@ -541,6 +541,8 @@ paths:
541541 security :
542542 - ImmutableApiKey :
543543 - refresh:metadata
544+ - BearerAuthWithClient :
545+ - refresh:metadata
544546 - BearerAuth :
545547 - refresh:metadata
546548 summary : Refresh collection metadata
@@ -11746,6 +11748,10 @@ components:
1174611748 - $ref : ' #/components/schemas/MarketPriceNativeToken'
1174711749 - $ref : ' #/components/schemas/MarketPriceERC20Token'
1174811750 securitySchemes :
11751+ BearerAuthWithClient :
11752+ bearerFormat : JWT
11753+ scheme : bearer
11754+ type : http
1174911755 BearerAuth :
1175011756 bearerFormat : JWT
1175111757 scheme : bearer
@@ -11755,8 +11761,4 @@ components:
1175511761 name : x-immutable-api-key
1175611762 type : apiKey
1175711763 x-go-name : ImmutableApiKey
11758- BearerAuthWithClient :
11759- bearerFormat : JWT
11760- scheme : bearer
11761- type : http
1176211764
You can’t perform that action at this time.
0 commit comments