# Private Key API

This Request will return users their own private key to import or buy with a stage wallet account.

### Private Key API

<mark style="color:blue;">`GET`</mark> `https://api.stagemeta.dev/metamask/private-key`

#### Query Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| code<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
0x9eab47a9a****************6800a7
```

{% endtab %}

{% tab title="500: Internal Server Error There was an error in preparing the plaque. Please contact Stagemeta support." %}

{% endtab %}

{% tab title="401: Unauthorized The access token provided in the Authorization header is invalid." %}

{% endtab %}

{% tab title="404: Not Found The plaque specified in the endpoint does not exist" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X 'GET' \
  'https://api.stagemeta.dev/metamask/private-key?code=123' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzE4LCJpYXQiOjE2ODE1NzkzODN9.IVwG13FW0sF8XicJJh8W7yMOxKp5Zhsyazju1qVLI04'
```

{% endtab %}

{% tab title="Node" %}
{% code overflow="wrap" %}

```javascript
fetch('https://api.stagemeta.dev/metamask/private-key?code=123', {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
```

{% endcode %}
{% endtab %}
{% endtabs %}
