# Wallet Address Generation

## **getpresignedurl** <a href="#getpresignedurl" id="getpresignedurl"></a>

Get the Signed URL to generate the wallet address.

## Basic Information <a href="#basic-info" id="basic-info"></a>

<table><thead><tr><th width="134">Property</th><th width="279">Detail</th></tr></thead><tbody><tr><td>URL</td><td><code>/api/v1/getpresignedurl</code></td></tr><tr><td>Method</td><td>POST</td></tr></tbody></table>

## **R**equest parameter <a href="#request" id="request"></a>

<table><thead><tr><th width="166">Parameter</th><th width="101">Type</th><th width="156">Required</th><th width="291">Detail</th></tr></thead><tbody><tr><td>email</td><td>str</td><td>yes</td><td>E-mail address of the account registered with NFT Garden</td></tr><tr><td>timeout</td><td>number</td><td>no</td><td>Validity period of Signed URL (minutes), positive integer, 1~10080</td></tr></tbody></table>

## Sample requests <a href="#sample-request" id="sample-request"></a>

```json
{
  "email": "example@gmail.com",
  "timeout": 60
}
```

## Example of successful response <a href="#response" id="response"></a>

```json
{
  "request": {
      "email": "example@gmail.com",
      "timeout": 60
  },
  "response": {
      "url": "https://wallet.nftgarden.app/v1/wallet/create?expiry=139...&issued_at=178...&action=generate_wallet&issuer=example%40gmail.com&signature=lOl..."
  }
}
```

## Example of response in case of failure(status code 400) <a href="#error" id="error"></a>

```json
{
  "errorCode": "VALIDATION_ERROR",
  "message": "入力値が不正です",
  "detail": [
      {
          "loc": [
              "body",
              "timeout"
          ],
          "msg": "ensure this value is less than or equal to 10080",
          "type": "value_error.number.not_le",
          "ctx": {
              "limit_value": 10080
          }
      }
  ]
}
```

## Wallet address generation using signed URL <a href="#signed-url" id="signed-url"></a>

POST to the url of response.

## Sample requests <a href="#signed-url-sample-request" id="signed-url-sample-request"></a>

```json

curl -X POST "https://wallet.nftgarden.app/v1/wallet/create?expiry=1390715135..."

```

## Example of successful response <a href="#signed-url-response" id="signed-url-response"></a>

```
{
    "request": {
        "expiry": 1715073373,
        "issued_at": 1715069773,
        "action": "generate_wallet",
        "issuer": "example@gmail.com",
        "signature": "omit"
    },
    "wallet": {
        "address": "0x0000000000000000000000000000000000000000",
        "private_key": "0x0000000000000000000000000000000000000000000000000000000000000000"
    }
}
```
