Using web API in Swift app

2 posts / 0 new
Last post
owenbennett
Using web API in Swift app

Hi,

I'm building an iOS app that requires elevation data for a given longitude and latitude. I've set up Alamofire to generate a GET request to e.g.

http://open.mapquestapi.com/elevation/v1/profile?key=XXX&shapeFormat=raw... (with a valid key obviously)

When I put this into a browser, it works fine, but when I call it through my app, it returns the error: "The AppKey submitted with this request is invalid."

Is it not possible to use the API in this way?

Thanks,

Owen

 


MQBrianCoakley
Try encoding, or un-encoding,
Try encoding, or un-encoding, the key. The old keys were wonky and had special characters in them and encodement was odd.