BranchMetrics/branch-deep-linking-public-api

Unable to set uri scheme which contains numbers

dm77 opened this issue · 4 comments

dm77 commented

Hi,

Whenever I try to create/update branch app configuration with following parameters, I get an error:

{:user_id=>"99339170534654343",
 :app_name=>"Gamedev",
 :dev_name=>"Zerista Developer",
 :dev_email=>"zbuild@zerista.com",
 :android_url=>"com.zerista.gamedev2015",
 :android_uri_scheme=>"com.zerista.gamedev2015://",
 :web_url=>"https://gamedev.zerista.com",
 :ios_url=>"id2",
 :app_id=>"101089275252048462"}
{"error":{"code":400,"message":"Invalid Android URI scheme"}}

However this request goes through fine:

{:user_id=>"99339170534654343",
 :app_name=>"Gamedev",
 :dev_name=>"Zerista Developer",
 :dev_email=>"zbuild@zerista.com",
 :android_url=>"com.zerista.gamedev",
 :android_uri_scheme=>"com.zerista.gamedev://",
 :web_url=>"https://gamedev.zerista.com",
 :ios_url=>"id2",
 :app_id=>"101089275252048462"}

Response

{"app_key":"101089275252048462","creation_date":"2015-03-02T23:43:07.961Z","app_name":"Gamedev","origin":null,"dev_name":"Zerista Developer","dev_email":"zbuild@zerista.com","android_url":"com.zerista.gamedev","android_uri_scheme":"com.zerista.gamedev://","ios_url":"id2","ios_uri_scheme":null,"ios_store_country":"US","web_url":"https://gamedev.zerista.com","short_url_domain":null,"text_message":null,"og_app_id":null,"og_title":null,"og_image_url":null,"og_description":null}

According to RFC2396, uri schemes can have digits in them

http://stackoverflow.com/questions/3641722/valid-characters-for-uri-schemes
http://www.ietf.org/rfc/rfc2396.txt

We are using the android package name for our uri scheme and some of our android packages are of the form com.zerista.gamedev2015.

Would it be possible to support digits in the uri scheme?

Thank you.

@dm77 That's totally reasonable. I can't believe we have that restrictive of regex in place... We'll get this resolved right away.

dm77 commented

Awesome! Thanks so much

@dm77 sorry about this - it should be fixed now. please close the issue if it's working for you :-)

dm77 commented

@dmitrig01 No worries. Everything is working great now. Thanks so much for taking care of this.