url for otm2 and iOS app

36 views
Skip to first unread message

Wes James

unread,
May 19, 2015, 11:24:07 AM5/19/15
to opentree...@googlegroups.com
I have this url with the otm2 server and iOS app:


it says "version 1 not supported"

What is the v1 supposed to be?  I tried the default in the app "v0.1", but it comes up with a list of supported commands the v0.1 is not one of these.

Thanks,

-wes

Justin Walgran

unread,
May 19, 2015, 11:27:54 AM5/19/15
to opentree...@googlegroups.com
If you are running the latest code, the version segment in the url should be /v3/

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wes James

unread,
May 19, 2015, 11:34:05 AM5/19/15
to opentree...@googlegroups.com
Ok.  I put that in.  I tried it in a browser to see the output.  It is blank.  I tried it with the app and get Error: Could not load map list.  What kind of output should I see with the browser to know something is working?

Thanks,

-wes

--
You received this message because you are subscribed to a topic in the Google Groups "opentreemap-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opentreemap-user/VbLh0G_0STQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opentreemap-us...@googlegroups.com.

Wes James

unread,
May 19, 2015, 11:35:12 AM5/19/15
to opentree...@googlegroups.com
Right now the server is http not https, does that make any difference other than security of the url?

Thanks,

-wes

On Tue, May 19, 2015 at 9:27 AM, Justin Walgran <jwal...@azavea.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "opentreemap-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opentreemap-user/VbLh0G_0STQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opentreemap-us...@googlegroups.com.

Justin Walgran

unread,
May 19, 2015, 12:11:01 PM5/19/15
to opentree...@googlegroups.com
The OTM2 API requires that all requests be signed. The iOS and Android applications sign all their requests and, when you debug the iOS application, it will prints this signed requests to console. Here is what a signed request looks like:

You can take one of these signed requests and test it in a browser, but you need an application to properly generate the timestamp and signature. You can generate the access/secret key pair required for message signing using the Django shell.

$ python manage.py shell
>>> from api.models import *
>>> a = APIAccessCredential.create()
>>> a.access_key
# prints the access key
>>> a.secret_key
# prints the secret key

In the iOS application, these keys are stored and read from the Implementation.plist.

Using SSL is separate from signing API request. The API will work identically over http and https.

Wes James

unread,
May 19, 2015, 12:19:08 PM5/19/15
to opentree...@googlegroups.com
I have the accessKey in the implementation.plist. I debugged the app and pulled the url string out and put it in a browser to test results.  I put in "blah" for the actual data in the url for these emails.  I get a blank web page with api/v3/......

wes

Wes James

unread,
May 19, 2015, 12:23:57 PM5/19/15
to opentree...@googlegroups.com
In the implementation.plist there is an APIKey (don't know this one), AccessKey (have that one) and SecretKey (have that one).   Is the correct APIKey needed also with this process?

Wes James

unread,
May 19, 2015, 3:51:46 PM5/19/15
to opentree...@googlegroups.com
I took the app code and put it on a mac with xcode 5 and when I tap on the Search all Tree Maps there it works in the simulator.  Hmmmm.......  I then ran on my iPhone and it failed again.  I then ran in iPhone 4s simulator in xcode 6 and it works there.  Any idea why it works in simulator but not on real phone?

Thanks,

-wes
Reply all
Reply to author
Forward
0 new messages