# Getting unauthorized when attempting to get api\_base\_url from ECE

**URL:** <https://discuss.elastic.co/t/getting-unauthorized-when-attempting-to-get-api-base-url-from-ece/248005>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [September 9, 2020, 12:59pm UTC](https://discuss.elastic.co/t/getting-unauthorized-when-attempting-to-get-api-base-url-from-ece/248005 "2020-09-09T12:59:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdcrtse](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mdcrtse](https://discuss.elastic.co/u/mdcrtse)\
**Post date:** [September 9, 2020, 12:59pm UTC](https://discuss.elastic.co/t/getting-unauthorized-when-attempting-to-get-api-base-url-from-ece/248005/1 "2020-09-09T12:59:47Z")

</div>

I am attempting to retrieve the api base url from an ECE environment. When I issue the following command:  
curl -s -k -XGET [https://XXX.YYY.ZZZ:12443/api/v1/platform/configuration/api\_base\_url](https://XXX.YYY.ZZZ:12443/api/v1/platform/configuration/api_base_url) -H "Authorization: Bearer XXXX"

I get the following response:  
{  
"errors": [  
{  
"message": "The supplied authentication is not authorized to access this resource. Reason: [Missing required permissions].",  
"code": "root.unauthorized.rbac"  
}  
]  
}

As another point of information. The Bearer token returns data as expected when I run this command:  
curl -s -k -XGET [https://XXX.YYY.ZZZ:12443/api/v1/platform](https://XXX.YYY.ZZZ:12443/api/v1/platform) -H "Authorization: Bearer XXXX"

It returns:  
{  
"phone\_home\_enabled": true,  
"eula\_accepted": true,  
"services": [  
{  
"type": "admin-console",  
"image": [  
{  
"id": "xxx.yyy.zzz.aaa",  
"version": "2.4.2",  
"hash": "sha256:44f5f6c597475315a9b43456912dfadd6c8d3e44d12927b9158a6cd41640fbb5",  
"tag": "[docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:2.4.2](http://docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:2.4.2)"  
}  
]  
}  
],  
"version": "2.4.2"  
}

Any help would be appreciated. Note the Bearer token belongs to the admin user which was created when I installed ECE.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 23, 2020, 1:00pm UTC](https://discuss.elastic.co/t/getting-unauthorized-when-attempting-to-get-api-base-url-from-ece/248005/2 "2020-09-23T13:00:20Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
