queryQrcodeInstKeys
机构解码公钥查詢
错误码: (无额外错误码)
/traffic/qrcode/instKeys
Usage and SDK Samples
curl -X GET -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/qrcode/instKeys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CommonApi;
import java.io.File;
import java.util.*;
public class CommonApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: jwsAuth
ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
jwsAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.setApiKeyPrefix("Token");
CommonApi apiInstance = new CommonApi();
String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
String contentType = contentType_example; // String | application/json
try {
QueryPublicKeyResult result = apiInstance.queryQrcodeInstKeys(clientId, accept, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommonApi#queryQrcodeInstKeys");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CommonApi;
public class CommonApiExample {
public static void main(String[] args) {
CommonApi apiInstance = new CommonApi();
String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
String contentType = contentType_example; // String | application/json
try {
QueryPublicKeyResult result = apiInstance.queryQrcodeInstKeys(clientId, accept, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommonApi#queryQrcodeInstKeys");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];
String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
CommonApi *apiInstance = [[CommonApi alloc] init];
// 机构解码公钥查詢
[apiInstance queryQrcodeInstKeysWith:clientId
accept:accept
contentType:contentType
completionHandler: ^(QueryPublicKeyResult output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;
// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"
var api = new AlipayHkTrafficPlatformInterface.CommonApi()
var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system
var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json
var contentType = contentType_example; // {String} application/json
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.queryQrcodeInstKeys(clientId, accept, contentType, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class queryQrcodeInstKeysExample
{
public void main()
{
// Configure API key authorization: jwsAuth
Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");
var apiInstance = new CommonApi();
var clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
var accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
var contentType = contentType_example; // String | application/json
try
{
// 机构解码公钥查詢
QueryPublicKeyResult result = apiInstance.queryQrcodeInstKeys(clientId, accept, contentType);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CommonApi.queryQrcodeInstKeys: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');
$api_instance = new Swagger\Client\Api\CommonApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
try {
$result = $api_instance->queryQrcodeInstKeys($clientId, $accept, $contentType);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommonApi->queryQrcodeInstKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CommonApi;
# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";
my $api_instance = WWW::SwaggerClient::CommonApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
eval {
my $result = $api_instance->queryQrcodeInstKeys(clientId => $clientId, accept => $accept, contentType => $contentType);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CommonApi->queryQrcodeInstKeys: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CommonApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
try:
# 机构解码公钥查詢
api_response = api_instance.query_qrcode_inst_keys(clientId, accept, contentType)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommonApi->queryQrcodeInstKeys: %s\n" % e)
Parameters
Name | Description |
---|---|
clientId* |
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
|
Accept* |
String
application/vnd.alipayhk.payment-v1+json
Required
|
Content-Type* |
String
application/json
Required
|