賬號相關

創建認證賬號


curl --location --request GET 'https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx'

import requests

url = "https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx"

payload={}
files={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload, files=files)

print(response.text)

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
   CURLOPT_URL => 'https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx',
   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',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

var formdata = new FormData();

var requestOptions = {
   method: 'GET',
   body: formdata,
   redirect: 'follow'
};

fetch("https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));

package main

import (
   "fmt"
   "bytes"
   "mime/multipart"
   "net/http"
   "io/ioutil"
)

func main() {

   url := "https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx"
   method := "GET"

   payload := &bytes.Buffer{}
   writer := multipart.NewWriter(payload)
   err := writer.Close()
   if err != nil {
      fmt.Println(err)
      return
   }


   client := &http.Client {
   }
   req, err := http.NewRequest(method, url, payload)

   if err != nil {
      fmt.Println(err)
      return
   }
   req.Header.Set("Content-Type", writer.FormDataContentType())
   res, err := client.Do(req)
   if err != nil {
      fmt.Println(err)
      return
   }
   defer res.Body.Close()

   body, err := ioutil.ReadAll(res.Body)
   if err != nil {
      fmt.Println(err)
      return
   }
   fmt.Println(string(body))
}

OkHttpClient client = new OkHttpClient().newBuilder()
   .build();
MediaType mediaType = MediaType.parse("text/plain");
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON, "{}");
Request request = new Request.Builder()
   .url("https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx")
   .method("GET", body)
   .build();
Response response = client.newCall(request).execute();

GET /authAccount/add

請求參數

名稱 類型 必選 說明
appKey string 用戶的AppKey
userSuffix string 賬號後綴【舊:C+賬號後綴】【中轉:B+賬號後綴】(位數不能超過7位,不可少於3位,不可有特殊符號)
pass string 密碼(位數不能超過8位,不可少於3位,不可有特殊符號)
traffic int 分配流量(float64)
trafficType number 流量類型
                                    
https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx

                                

相應結果

名稱 類型 說明
code int 響應代碼
msg string 響應消息
                                        
{
    "code": 0,
    "msg": "创建成功"
}

                                    
                                        
{
  "code": 1,
  "msg": "<string>"
}

                                    

curl --location --request GET 'https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx'

import requests

url = "https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx"

payload={}
files={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload, files=files)

print(response.text)

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
   CURLOPT_URL => 'https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx',
   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',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

var formdata = new FormData();

var requestOptions = {
   method: 'GET',
   body: formdata,
   redirect: 'follow'
};

fetch("https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));

package main

import (
   "fmt"
   "bytes"
   "mime/multipart"
   "net/http"
   "io/ioutil"
)

func main() {

   url := "https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx"
   method := "GET"

   payload := &bytes.Buffer{}
   writer := multipart.NewWriter(payload)
   err := writer.Close()
   if err != nil {
      fmt.Println(err)
      return
   }


   client := &http.Client {
   }
   req, err := http.NewRequest(method, url, payload)

   if err != nil {
      fmt.Println(err)
      return
   }
   req.Header.Set("Content-Type", writer.FormDataContentType())
   res, err := client.Do(req)
   if err != nil {
      fmt.Println(err)
      return
   }
   defer res.Body.Close()

   body, err := ioutil.ReadAll(res.Body)
   if err != nil {
      fmt.Println(err)
      return
   }
   fmt.Println(string(body))
}

OkHttpClient client = new OkHttpClient().newBuilder()
   .build();
MediaType mediaType = MediaType.parse("text/plain");
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON, "{}");
Request request = new Request.Builder()
   .url("https://api.98ip.com/authAccount/add?appKey=xxx&userSuffix=xxx&pass=xxx")
   .method("GET", body)
   .build();
Response response = client.newCall(request).execute();