Trusted Application Authorization Flow

The trusted application flow can only be used if your application has a trust relationship with the user and no other flow can work for your application. For example, you can use trusted app flow if you have a highly privileged desktop application and user wants to give your application explicit access to all user data by providing you with user login and password. This flow is not enabled by default. If you want to use this flow, please email us and after we review your request we will make a decision on granting you the flow access.

Application Authorization

In order to authenticate your application, you must pass the following parameter to the request_token endpoint:

Oauth Endpoint

https://www.geni.com/platform/oauth/request_token

Parameters

Name Description Required
client_id Application key generated during the app registration. true
username User's username. true
password User's password. true
grant_type For this flow the grant type must be set to "password". true
scope A comma delimited list of permissions that the application needs. By default the scope is set to a full data access. This is subject to change in the upcoming releases. false

Example

https://www.geni.com/platform/oauth/request_token?client_id=YOUR_APP_ID&username=USERNAME&password=PASSWORD&grant_type=password

If your app is successfully authenticated and the user credentials are valid, the authorization server will return the access token in a JSON format:

Returned Fields

Name Type Description
access_token String Access token to be used with every API request
expires_in Number Seconds until the token will expire
refresh_token String Token that can be used to get a new access token

Example

{"expires_in":86400,"refresh_token":"wEq6FMb3CcfPN6CckQv7","access_token":"sye4NMd130L4wqq13zjqqLHwuHd5jnnKwdVi9S8X"}

If your app failed to provide appropriate parameters, you will get one of the errors below in JSON format:

Returned Fields

Name Type Description
error String Error code
error_description String Error description

Example

{"error_description":"invalid client application id","error":"unauthorized_client"}

app007