---
description: >-
  The high performance access to services providing COSMOS layers is made
  available through the simple retrieval of URLs targeting respective services.
---

# 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="https://121751425-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQHSpqy8m9sTZOxWYW7%2F-MR0aFD9UDZGgv4Ryp70%2F-MR3zsgQ2Ce2WhXeWVIN%2Fcredentials_management.pdf?alt=media&token=807a98f1-298d-4e36-ad01-bfa43310dd75" %}
How credentials should be managed
{% endfile %}

Descriptions for the URL keys can be found here:

{% content-ref url="service-listing" %}
[service-listing](service-listing)
{% endcontent-ref %}
