java sdk 下载_JavaSDK如何下载使用

大神问下 获取assacctoken出错

String authHost = "https://aip.baidubce.com/oauth/2.0/token?";

String getAccessTokenUrl = authHost

// 1. grant_type为固定参数

+ "grant_type=client_credentials"

// 2. 官网获取的 API Key

+ "&client_id=" + "SUGktFzGCA2wwcbfO5xWDySL"

// 3. 官网获取的 Secret Key

+ "&client_secret=" + "u5g7LPFltdXXyHusC7RbrDy6I6PPV9YS";

为什么我用官网上的代码基本没改只填充了key 运行会出现java.net.MalformedURLException: Illegal character in URL

at sun.net.www.protocol.https.HttpsURLConnectionImpl.checkURL(HttpsURLConnectionImpl.java:86)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.(HttpsURLConnectionImpl.java:94)

包是官网的最新的

Postman提交https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=SUGktFzGCA2wwcbfO5xWDySL&client_secret=u5g7LPFltdXXyHusC7RbrDy6I6PPV9YS

却成功返回assecc token

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值