> 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 %}
