### Get Amazon User Details

#### cURL

```bash
curl --request GET \
  --url https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me \
  --header 'X-API-Key: <api-key>'
```

#### Python

```python
import requests

url = "https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

#### JavaScript (Fetch API)

```javascript
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

#### PHP

```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

#### Golang

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

url := "https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}
```

#### Java (Unirest)

```java
HttpResponse<String> response = Unirest.get("https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me")
  .header("X-API-Key", "<api-key>")
  .asString();
```

#### Ruby

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-trial.cognigy.ai/new/v2.0/external/alexa/users/me")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
```

---

### Response Codes

- **200**: Successful response with user data.
- **400**: Bad Request - Validation failed.
- **401**: Unauthorized - Invalid API Key.
- **403**: Forbidden - Access denied.
- **404**: Not Found - Resource does not exist.
- **500**: Internal Server Error - Something went wrong on the server side.

### Expected Response Structure

```json
{
  "userId": "<string>",
  "accessToken": "<string>",
  "refreshToken": "<string>"
}
```

### Error Response Structure

```json
{
  "type": "<string>",
  "title": "<string>",
  "status": <int>,
  "detail": "<string>",
  "instance": "<string>",
  "code": <int>,
  "traceId": "<string>",
  "details": {}
}
```

### Authorizations
- **X-API-Key**: Required in the HTTP header.
