Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions app_setup.md

This file was deleted.

10 changes: 3 additions & 7 deletions documents.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@
"file":"index",
"submenu": [
{
"title":"Register your App",
"file":"app_setup"
"title":"Choose Your Grant Type",
"file":"grant_type"
},
{
"title": "Authentication",
"file":"doc_auth"
},
{
"title":"APIs Overview",
"title":"About Our APIs",
"file":"doc_apis"
},
{
"title":"Getting Help",
"file" : "getting_help"
}
]
},
{
Expand Down
66 changes: 66 additions & 0 deletions grant_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

# Chooase Your Grant Type #

## Which Grant Type to Use? ##

Before you register your app and obtain authentication credentials, you need to decide whether to use implicit or authorization code to generate your access token.

Which is best for you?

### Implicit grant ###

If you have a “single page application” (e.g., an application running in a browser using a scripting language such as Javascript), then the implicit grant should be used. In this case, instead of getting an authorization code that needs to be exchanged for an access token, you would retrieve an access token directly. Although this is more efficient since it reduces the number of round trips required to get an access token, it is not secure because the access token is exposed on the client side. In other words, implicit grant does not return refresh tokens because the browser generally cannot keep them private. Mojio implicit grant tokens expire in 12 hours; after this, users have to log in again.

### Authorization code grant ####

If you have a regular web app executing on a server, then the authorization code grant is the flow you should use to retrieve an authorization token and, optionally, a refresh token. This is considered the safest choice since the authorization token is passed directly to the web server hosting the application without going through the user's web browser and risking exposure. Mojio refresh tokens are good for a month; once expired, your developers can generate a new token without users needing to log in again.

## How to Generate a Grant Token ##

Here is the code snippet to use to generate a token:


### IMPLICIT ###

{
"Description": "string",
"Name": "string",
"AllowedGrantTypes": [
"implicit"
],
"RedirectUris": [
"string"
]
}

### AUTHORIZATION CODE ###
{
"Description": "string",
"Name": "string",
"AllowedGrantTypes": [
"authorization_code",
“refresh_token”
],
"RedirectUris": [
"string"
]
}

**NOTE: Your redirect URIs must use HTTPs**

## Next Steps ##

To generate the code yourself:

+ Click the API link above, from the sidebar, click **Apps**, then **POST** for **/v2/apps**.(or, if you’re logged in, go to https://docs.moj.io/#!/api/detail/REST/~2Fv2~2Fapps/post)
+ If sample code is not shown in the Value box under Parameters, click the far right icon.
+ In the snippet, change the values as needed and click **Execute**.

Once that is done, proceed to the [authentication instructions page](https://docs.moj.io/#!/document/view/doc_auth).







21 changes: 13 additions & 8 deletions index.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# Getting Started #
# Get Started #

Welcome to Mojio! This page will help get you on your way to connecting to the Mojio Connected Device Platform.
Welcome to Mojio!

The Mojio Connected Device Platform is the leading open platform for securely accessing and interacting with connected devices. Using a telematic control unit (TCU) connected to an asset, the platform retrieves, parses, and delivers a valuable array of telemetry data and information to the Mojio Motion app on a user’s mobile device or approved third-party app.
This site will help get you on your way to connecting to the Mojio platform via our APIs.

Mojio officially supports _iOS_, _Android_, _.Net_ and _JavaScript_ and has SDKs for each of these environments. If you do not use one of these environments, as long as your choice of development tools support open technologies such as _HTTPS_, _REST_ and _WebSockets_, you will be able to integrate with Mojio.
Mojio officially supports _iOS_, _Android_, _.Net_ and _JavaScript_ and has SDKs for each of these environments. If you do not use one of these environments, as long as your choice of development tools supports open technologies such as _HTTPS_, _REST_ and _WebSockets_, you will be able to integrate with Mojio.

# Some Basic Ground Rules #
## Some Basic Ground Rules ##

Mojio gives you access to a great deal of data from its connected devices. Our hope is that you will create apps and services to improve the experience of your users. We ask that you respect the user, their overall app experience, and safeguard their privacy.
Mojio gives you access to a great deal of data about drivers and their vehicles. Our hope is that you will create apps and services to improve the end user experience and that you respect end users and safeguard their privacy.

As well, for developers creating integrations with our connected car devices, please note that driving while distracted is now a leading cause of accidents. Please keep this in mind with any solution you are developing and ensure that you do not distract the user when their focus should be on the road.
Driving while distracted is now a leading cause of accidents. We are building the connected car to improve the overall user experience on the road. Please do so with safety in mind. Unlike other apps, Mojio apps know when drivers are behind the wheel. Please take extra care in ensuring that you do not distract users when their focus should be on the road.

Finally, we want to help you build great apps. If there is anything we can do to make it easier to build car connected apps, please reach out to the Mojio team.

## Next Steps ##

If you're just getting started and ready to get going, it's time to Choose Your Grant Type.

Finally, we want to help you build great apps. If there is anything we can do to make it easier to build connected device apps, please reach out to the Mojio team.