> For the complete documentation index, see [llms.txt](https://exolabs-ch.gitbook.io/cosmos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://exolabs-ch.gitbook.io/cosmos/service-authentication.md).

# Service Authentication

{% hint style="info" %}
Once the service URLs are fetched, there is no more need for further authentication and users are free to use their favourite library to enjoy the smooth experience of COSMOS integration!
{% endhint %}

## Request Service URLs

<mark style="color:blue;">`GET`</mark> `https://<user>:<password>@p20.cosmos-project.ch/urlrequest`

Respective service URLs can be retrieved using a BASIC authentication over HTTPS.

#### Path Parameters

| Name                | Type   | Description                          |
| ------------------- | ------ | ------------------------------------ |
| \<user>:\<password> | string | user and password for authentication |

{% tabs %}
{% tab title="200 JSON response containing all available services for a respective user. " %}

```javascript
{
    pathrequest:"XXXXXXXXXXXXXXXXXXX",
    boundary:"XXXXXXXXXXXXXXXXXXX",
    staterequest:"XXXXXXXXXXXXXXXXXXX",
    pathrequest_cosmos20alps:"XXXXXXXXXXXXXXXXXXX",
    cosmos500:[
        {
            "name":"exosnow_map500",
            "url":"XXXXXXXXXXXXXXXXXXX"
        }
    ],
    cosmos20:[
        {
            name:"europealps",
            url:"XXXXXXXXXXXXXXXXXXX"
        },
        {
            name:"usarockies",
            url:"XXXXXXXXXXXXXXXXXXX"
        },
        {
            name:"usasierra",
            url:"XXXXXXXXXXXXXXXXXXX"
        },
        {
            name:"centrehimalaya",
            url:"XXXXXXXXXXXXXXXXXXX"
        },
        {
            name:"westhimalaya",
            url:"XXXXXXXXXXXXXXXXXXX"
        }
    ],
    beta:[
        {
            name:"sd_usasierra",
            url:"XXXXXXXXXXXXXXXXXXX"
        },
        {
            name:"sd_usarockies",
            url:"XXXXXXXXXXXXXXXXXXX"
        
        },
        {
            name:"age_alps",
            url:"XXXXXXXXXXXXXXXXXXX"
        }
    ],
    point_sd_rockies:"XXXXXXXXXXXXXXXXXXX",
    point_sd_sierra:"XXXXXXXXXXXXXXXXXXX"
}
```

{% endtab %}
{% endtabs %}

{% hint style="danger" %}
It is expected that this request of URLs is made by the customer's backend to ExoLabs backend.&#x20;

**The customer client must never have access to the authentication credentials and should be authorized by a separate authentication between customer backend and client!**&#x20;
{% endhint %}

{% file src="/files/-MR3zsgQ2Ce2WhXeWVIN" %}
How credentials should be managed
{% endfile %}

Descriptions for the URL keys can be found here:

{% content-ref url="/pages/-MQRNR28NCoL6VxIrxT3" %}
[Service Listing](/cosmos/service-listing.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://exolabs-ch.gitbook.io/cosmos/service-authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
