# Ionic with Magento API call

**URL:** <https://forum.ionicframework.com/t/ionic-with-magento-api-call/81537>\
**Category:** ionic-v3\
**Created:** [March 2, 2017, 8:07am UTC](https://forum.ionicframework.com/t/ionic-with-magento-api-call/81537 "2017-03-02T08:07:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![molayac](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/molayac/32/111985_2.png) [@molayac](https://forum.ionicframework.com/u/molayac)\
**Post date:** [July 25, 2017, 8:27pm UTC](https://forum.ionicframework.com/t/ionic-with-magento-api-call/81537/4 "2017-07-25T20:27:35Z")

</div>

This problem only is present on Browser, cause on Android and IOS devices works without errors, you must add a proxy config on ionic json config file.

-\> ionic.config.json file

“type”: “ionic-angular”,  
“proxies”: [  
{  
“path”: “/magentoAPI”,  
“proxyUrl”: “[http://magento.docker.local/rest/V1/](http://magento.docker.local/rest/V1/)”  
}  
]  
}

and use the path as your url from http  
example:  
class …  
private magentoAPI:string ="/magentoAPI";  
…  
customerInfoService() {  
let headers = this.headers;  
headers.append(‘Authorization’, "Bearer " + **this.token** );  
let options = new RequestOptions({ headers: headers });  
return this.http.get(this.magentoAPI + “customers/me”, options)  
.map(response =\> response.json());

}

You can find more info here: [Proxy Problems with Ionic](https://forum.ionicframework.com/t/proxy-problems-with-ionic-2/43354/10)

Regards,  
Marlon Olaya

---

_[View the full topic](https://forum.ionicframework.com/t/ionic-with-magento-api-call/81537)._
