# Use a service

## Use an authenticated service

Sending a request to an authenticated service requires an API token. Please create one from the Account page. We would recommend you to export it as an environment variable.

To authenticate your access to the service, an request must contains an authentication header:

```
curl -H "X-Hoverfly-Authorization: Bearer $HFC_TOKEN" SERVICE_URL
```

In your project, you may not want to change your code to use Hoverfly Cloud. You can use the Hoverfly Cloud command line tool `hcc` to handle the authentication, and you can call your Hoverfly Cloud service like a localhost service.

```
hcc reverse-proxy start --name SERVICE_NAME --api-token $HFC_TOKEN
```

Once you run the above command, the service would be available on <http://localhost:8500>

## View service details and journal

The journal logs every request and response that Hoverfly Cloud sees so it is useful for troubleshooting, analysis and monitoring. The journal page provides a number of filters to allow you to home in on errors and particular entries.

You can click on the service name to open up the service details page. It gives you information about the service, such as launch time, mode, URL, and target URL etcs.

You can also view the journal which is a request log of the service. A green entry indicates a successful match and a red entry indicates a failed match.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloud.hoverfly.io/work-with-services/use-a-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
