アカウントパスワード設定依頼

アカウントに登録されているメールアドレスに対してパスワード設定依頼を行います。

 

パスワード設定依頼のメールを送信できるのは以下のいずれかの場合です。

  • アカウント設定の新規登録時
  • メールアドレス変更時でパスワード未設定状態の場合

以下の場合はエラーとなります。

  • メールアドレスそのものが実在しない(送信先が確認できない、またはメールが届かない)場合
  • 受信側で拒否された実績がある場合

 

当 API を通してパスワード設定依頼のメールが送信された場合、一定時間はメールの再送信がされずにエラーとなります。(現在の再送制限をしている間隔時間: 600 sec)

Request Interface

HTTP Request

POST /accounts/password/set-request

Parameter

Request Parameter

Value

Required

Description

Default Value

accountId

string

true

ID that uniquely distinguishes the account (32 alphabet characters)

-

Response Interface

リクエストが正常に処理された場合、レスポンスボディは返却されません。

Examples

public static void main(String[] args) {
    String host = "https://www.webconnect.hulft.com";
    String apiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    try {
        URL url = new URL(host + "/api/v2/accounts/password/set-request");
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        String postData = "{\"accountId\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}";
        connection.setRequestMethod("POST");
        connection.setDoOutput(true);
        connection.setDoInput(true);
        connection.setRequestProperty("Authorization", "Bearer " + apiKey);
        connection.setRequestProperty("Content-Type", "application/json");
        connection.setRequestProperty("Content-Length", Integer.toString(postData.length()));
        try (BufferedWriter writer = 
		new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()))) {
        	writer.write(postData);
        }
        System.out.println(connection.getResponseMessage()); 
			// The response does not contain the response body.
    } catch (IOException ex) {
        // error
    }
}

// load jquery 
var host = 'https://www.webconnect.hulft.com';
var apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$.ajax({
  type: 'POST',
  url: host + '/api/v2/accounts/password/set-request',
  headers: {
    Authorization: 'Bearer ' + apiKey
  },
  contentType: 'application/json',
  data: JSON.stringify({
  "accountId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  })
}).done(function(data, status, xhr) {
  console.log(data);
}).fail(function(data, status, xhr) {
  console.log(data);
});