Authentication/Credit Line Resource
The following resources are applicable:
- /externalservice/authorization/account/{email}/{password}
- /externalservice/authorization/token/{email}/{password}
- /externalservice/myaccount/attribution
/externalservice/authorization/token/{email}/{password}
Returns auth token and domain. The token is static and only needs to be generated once. All service requests must pass a token parameter. Ex: ?token=abcdefghijklmnopqrstuvwxyz123456789
GET
Parameters
name | description | type | default |
---|---|---|---|
Email address(provided in the OnTheSnow Web Services email sent after account was created) | path | ||
password | Password(provided in the OnTheSnow Web Services email sent after account was created) | path |
example
curl http://clientservice.onthesnow.com/externalservice/authorization/token/test%40mountainnews.com/test123!
Response Body
{
"token": "abcdefghijklmnopqrstuvwxyz123456789",
"domain": "test.com"
}
/externalservice/authorization/account/{email}/{password}
Lists the services you currently have access to
GET
Parameters
name | description | type | default |
---|---|---|---|
Email address(provided in the OnTheSnow Web Services email sent after account was created) | path | ||
password | Password(provided in the OnTheSnow Web Services email sent after account was created) | path |
Example Request
curl http://clientservice.onthesnow.com/externalservice/authorization/account/test%40mountainnews.com/test123!
Response Body
{
"accountId": 12345,
"email": "test@test.com ",
"password": "password",
"company": "test",
"websiteMain": "test.com",
"maxPerMonth": 1000000,
"hasLatlong": true,
"hasCams": false,
"hasReviews": false,
"hasNews": false,
"canLite": true,
"canMobile": false,
"canPlus": true,
"hasWeather": true,
"hasAttribution": false,
"canWeb": false,
"isActive": true,
"hasOverviews": false
}
/externalservice/myaccount/attribution
Returns required attribution text, logo, and links
GET
Required Parameters
name | description | type | default |
---|---|---|---|
token | Ex: ?token=abcdefg1234567 - Token information can be found here - Instructions | param |
Optional Parameters
Note: By default, the data is returned in imperial/English (inches, feet etc...). You must include both language and country in your query string to override the default language/metric.
name | description | type | default |
---|---|---|---|
language | Ex: &country=at&language=de - Controls text translations. Full list of languages supported. | param | English |
country | Ex: &country=at&language=de - Controls metric type. Full list of countries supported | param | Imperial |
Example Request
curl http://clientservice.onthesnow.com/externalservice/myaccount/attribution?token=a5bae8eea465aae82aabfdbb5420b6d6ec7c0f3036be3d1d
Response Body
{
"attributionLogo": "http://images.onthesnow.com/images/logo.png",
"attributionText": "Snow Reports provided by OnTheSnow.com",
"requiresAttribution": true,
"requiresResortAttribution": true,
"iphoneAttributionText": "OnTheSnow Mobile Ski & Snow Reports for your iPhone",
"iphoneAttributionLink": "https://itunes.apple.com/us/app/ski-snow-report/id300412347?l=en&mt=8",
"androidAttributionText": "OnTheSnow on your Mobile Phone.",
"androidAttributionLink": "https://play.google.com/store/apps/details?id=com.skireport&hl=en-us",
"domain": "www.onthesnow.com"
}