Application Login Flow

In this flow, application requests authorization to make calls on its behalf. By using this flow application will get higher rate limits for the public API calls than making unauthorized calls without an access token. Application will also be able to get app related data, such as statistics and metrics.

Application Authorization

In order to authenticate your app, 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
client_secret Application secret generated during the registration process and availble in the application settings. true
grant_type For this flow you must set it to "client_credentials". true

Example

https://www.geni.com/platform/oauth/request_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials

If your app is successfully authenticated, 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

Examples

{"error_description":"invalid client application id","error":"unauthorized_client"}
rails-1a-012