All URIs are relative to https://openapi.alipay.com
Method | HTTP request | Description |
---|---|---|
Upload | POST /v3/alipay/open/mini/innerbaseinfo/applogo/upload | 内部小程序-小程序logo图片上传 |
AlipayOpenMiniInnerbaseinfoApplogoUploadResponseModel Upload (System.IO.Stream appLogo = null)
内部小程序-小程序logo图片上传
上传小程序logo图片
using System.Collections.Generic;
using System.Diagnostics;
using AlipaySDKNet.OpenAPI.Api;
using AlipaySDKNet.OpenAPI.Client;
using AlipaySDKNet.OpenAPI.Model;
using AlipaySDKNet.OpenAPI.Util;
using AlipaySDKNet.OpenAPI.Util.Model;
namespace Example
{
public class UploadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://openapi.alipay.com";
var apiInstance = new AlipayOpenMiniInnerbaseinfoApplogoApi(config);
// 设置alipayConfig参数
AlipayConfig alipayConfig = new AlipayConfig();
alipayConfig.AppId = "app_id";
alipayConfig.PrivateKey = "private_key";
// 密钥模式
alipayConfig.AlipayPublicKey = "alipay_public_key";
// 证书模式
// alipayConfig.AppCertPath = "../appCertPublicKey.crt";
// alipayConfig.AlipayPublicCertPath = "../alipayCertPublicKey_RSA2.crt";
// alipayConfig.RootCertPath = "../alipayRootCert.crt";
alipayConfig.EncryptKey = "encrypt_key";
AlipayConfigUtil alipayConfigUtil = new AlipayConfigUtil(alipayConfig);
apiInstance.Client.SetAlipayConfigUtil(alipayConfigUtil);
var appLogo = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | (optional)
try
{
// 内部小程序-小程序logo图片上传
AlipayOpenMiniInnerbaseinfoApplogoUploadResponseModel result = apiInstance.Upload(appLogo);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AlipayOpenMiniInnerbaseinfoApplogoApi.Upload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appLogo | System.IO.Stream****System.IO.Stream | [optional] |
AlipayOpenMiniInnerbaseinfoApplogoUploadResponseModel
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |