API接口网址
API接口网址 | https://api.ibaossl.com |
测试接口网址 | https://testapi.ibaossl.com |
获取token
请登录网站后, 在 我的设置 -> API 输入账号密码 ,提交后即可获取 token
Token 示例
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImQ5ZjY0YTNiNzBmMzUyZGJjZjFhNWEwZWM3OTk3NjA3OTZmN2NlYWIzZTcxMzRkNmE4MWVlYzdiMGQzZGNyNThkNDVmNzEwMDkzYjI3MDJjIn0.eyJhdWQiOiI1ZDNlNDI0Mi1iNTliLTQzNTMtYmUwOC00ZDk4MTU5NjVkMzEiLCJqdGkiOiJkOWY2NGEzYjcwZjM1MmRiY2YxYTVhMGVjNzk5NzYwNzk2ZjdjZWFiM2U3MTM0ZDZhODFlZWM3YjBGM2RjMjU4ZDQ1ZjcxMDA5M2IyNzAyYyIsImlXdCI6MTcwMzgzMDk4NywibmJmIIoxNzAzODMwOTg3LCJleHAiOjE3MDY52DQ1ODcuMzU3Njk3LCJzdWIiOiIxMjcxOCIsInNjb3BlIjpbInVzZXJhcGkiLCJhdXRoZW50aWNhdGVkIl19.i78uP0XKWoCP1QtXxPBYlGUn7hWZpnt3xOC27jT2KBp_6mrERut21-uNG48un-3UYaoEwmqyXM1gGcq5LMvN0b3l-O59YYVwzmyDt8noXm5ZYNY-akS5PuKKvxoIxNmAnmW1PUSHGF_eTxbA9r3U2wbM8XpQRePJvtfeShxqsaa9NH7AA3wMMsVj9G5elzQCvz8D7nwDqXrSX0V65WQsQlhRt77S9iHWSM4rTAlb10DOoLA5EP0M5cChwai26J-RgKN_rHi-QDwdovRLDp7XlQ94ml1pcMCrIowNHF23SfJ-e68u0WZuvCeIQhDJWI9yoHwGB7LortHnDGnwRcw9LQ
如何使用
在 Header 添加参数 Authorization,其值为在 Bearer 之后拼接 Token,参考如下代码使用
GET 请求示例
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.ibaossl.com/api/ssl/v3/order/45e0e3e8-53f6-463e-abee-035c3f6a006c/status?_format=json', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImQ5ZjY0YTNiNzBmMzUyZGJjZjFhNWEwZWM3OTk3NjA3OTZmN2NlYWIzZTcxMzRkNmE4MWVlYzdiMGQzZGNyNThkNDVmNzEwMDkzYjI3MDJjIn0.eyJhdWQiOiI1ZDNlNDI0Mi1iNTliLTQzNTMtYmUwOC00ZDk4MTU5NjVkMzEiLCJqdGkiOiJkOWY2NGEzYjcwZjM1MmRiY2YxYTVhMGVjNzk5NzYwNzk2ZjdjZWFiM2U3MTM0ZDZhODFlZWM3YjBGM2RjMjU4ZDQ1ZjcxMDA5M2IyNzAyYyIsImlXdCI6MTcwMzgzMDk4NywibmJmIIoxNzAzODMwOTg3LCJleHAiOjE3MDY52DQ1ODcuMzU3Njk3LCJzdWIiOiIxMjcxOCIsInNjb3BlIjpbInVzZXJhcGkiLCJhdXRoZW50aWNhdGVkIl19.i78uP0XKWoCP1QtXxPBYlGUn7hWZpnt3xOC27jT2KBp_6mrERut21-uNG48un-3UYaoEwmqyXM1gGcq5LMvN0b3l-O59YYVwzmyDt8noXm5ZYNY-akS5PuKKvxoIxNmAnmW1PUSHGF_eTxbA9r3U2wbM8XpQRePJvtfeShxqsaa9NH7AA3wMMsVj9G5elzQCvz8D7nwDqXrSX0V65WQsQlhRt77S9iHWSM4rTAlb10DOoLA5EP0M5cChwai26J-RgKN_rHi-QDwdovRLDp7XlQ94ml1pcMCrIowNHF23SfJ-e68u0WZuvCeIQhDJWI9yoHwGB7LortHnDGnwRcw9LQ' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
POST 请求示例
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.ibaossl.com/api/ssl/v3/order/PositiveSSL/create?_format=json', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "period": 1, "common_name": "*.domain.com", "csr": "-----BEGIN CERTIFICATE REQUEST-----\\nMIIC9zCCAd8CAQAwgYgxGDAWBgNVBAMMDyouNzA0NzA1NzA2Lnh5ejEwMC4GA1UE\\nCgwn5Lit5bGx5biC6ZWt6ZOt572R57uc56eR5oqA5pyJ6ZmQ5YWs5Y+4MQswCQYD\\nVQQLDAJJVDELMAkGA1UEBhMCAQkOMRowGDAJBgNVHpP5x\\/06wfD\\n66n4Ks8KPwMr7lqwyTX9RSkkn5eKEx7BjMG+CzIzwYETHmeEmqCxkgYWsIJbDPeZVPVJJ2mRIUoBjC9SejKt\\nYv1vnlzdlIS8X9yGbY9qDlR+VcZr7TuPYVrT4OiLbs+E8ExSWli\\/LwjzANNMlEiB\\n4Z2X\\/RvVbVJy1alsnGZrajNLVU8KvokPnK8htvuNRVgU707PSun83K0S+w==\\n-----END CERTIFICATE REQUEST-----", "dcv_method": "dns", "admin_firstname": "明", "admin_lastname": "李", "admin_phone": "020-00000000", "admin_email": "xyz@domain.com", "admin_title": "IT", "tech_firstname": "明", "tech_lastname": "李", "tech_phone": "020-00000000", "tech_email": "xyz@domain.com", "tech_title": "IT", "org_name": "广州市网络科技有限公司", "org_division": "IT", "org_region": "广东", "org_city": "广州", "org_addressline1": "兴业路111号", "org_addressline2": "", "org_phone": "020-00000000", "org_country": "CN", "org_postalcode": "510000" }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImQ5ZjY0YTNiNzBmMzUyZGJjZjFhNWEwZWM3OTk3NjA3OTZmN2NlYWIzZTcxMzRkNmE4MWVlYzdiMGQzZGNyNThkNDVmNzEwMDkzYjI3MDJjIn0.eyJhdWQiOiI1ZDNlNDI0Mi1iNTliLTQzNTMtYmUwOC00ZDk4MTU5NjVkMzEiLCJqdGkiOiJkOWY2NGEzYjcwZjM1MmRiY2YxYTVhMGVjNzk5NzYwNzk2ZjdjZWFiM2U3MTM0ZDZhODFlZWM3YjBGM2RjMjU4ZDQ1ZjcxMDA5M2IyNzAyYyIsImlXdCI6MTcwMzgzMDk4NywibmJmIIoxNzAzODMwOTg3LCJleHAiOjE3MDY52DQ1ODcuMzU3Njk3LCJzdWIiOiIxMjcxOCIsInNjb3BlIjpbInVzZXJhcGkiLCJhdXRoZW50aWNhdGVkIl19.i78uP0XKWoCP1QtXxPBYlGUn7hWZpnt3xOC27jT2KBp_6mrERut21-uNG48un-3UYaoEwmqyXM1gGcq5LMvN0b3l-O59YYVwzmyDt8noXm5ZYNY-akS5PuKKvxoIxNmAnmW1PUSHGF_eTxbA9r3U2wbM8XpQRePJvtfeShxqsaa9NH7AA3wMMsVj9G5elzQCvz8D7nwDqXrSX0V65WQsQlhRt77S9iHWSM4rTAlb10DOoLA5EP0M5cChwai26J-RgKN_rHi-QDwdovRLDp7XlQ94ml1pcMCrIowNHF23SfJ-e68u0WZuvCeIQhDJWI9yoHwGB7LortHnDGnwRcw9LQ' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;