Getting Started with Ora Public API

API Docs

Full API calls documentation is available here => https://api.ora.pm

Ora developers community 

Join us on http://spectrum.chat/ora/public-api for API help, suggestions or just to share what you are working on.

Create an Ora App

In order to use the API, you will need to create an app inside an Organization entity in Ora.

1. Navigate to <Your Organization> / Preferences

2. There scroll go the Applications section and click on the "Create an app" button

3. Fill the required information and click on the "Create App" button. Keep in mind that if you want to test our API using the interface at https://api.ora.pm you will have to set your application's redirect URI to https://api.ora.pm/swaggerui/oauth2-redirect.html

4. After you create your app, you will be able to expand it from the "arrow" button on the right. When you expand it, you will see your client_id and client_secret.

Testing your app

1. So now after you have your app, let's test some API calls at https://api.ora.pm .Navigate to the API URL. Then click on the "Authorize" button on the left side of the page.

 2. In the authorization modal, after you put your application's client_id and client_secret click "Authorize".

3. Then you will be navigated to Ora's page where the current user has to provide permissions to your app.

4. After that, you will be redirected back to the API page, where if everything was successful you will be logged in and you will be able to try the API calls. Lets for example test if everything is working normally by getting the currently logged user's projects. Follow these steps to do that:

  • Expand the projects tab
  • Click on the get projects endpoint
  • Click on the try it out button and then directly press the "execute" button since this call doesn't require any parameters
  • Voilà! In the response section, you will be able to see the response of the request.

Implement the OAuth2 flow

Ora's authorize URL is:https://ora.pm/authorize

1. The things you will have to pass to our authorize URL as params are:

  • client_id - your application client_id
  • redirect_uri - your applications-s redirect Uri
  • response_type - code 
  • state - optional (that string will be returned to your redirect_uri)

Example URL: https://ora.pm/authorize?response_type=code&client_id=fYL8JzMW3TdawAfFsjUrpSrM5bFC9qiNnh4zigwiKJo3DsFs&redirect_uri=https:%2F%2Fapi.ora.pm%2Fswaggerui%2Foauth2-redirect.html&state=TW9uIERlYyAyMyAyMDE5IDE3OjUxOjM2IEdNVCswMjAwIChFYXN0ZXJuIEV1cm9wZWFuIFN0YW5kYXJkIFRpbWUp&realm=

2. After the user that is following your link authorizes your app to have access to his profile, you will receive as URL params the state you passed and the generated code  you will need for completing the second step of the OAuth process

Ora's Token URL is: https://api.ora.pm/oauth/token

To get access to our API, you will have to send a POST request to our token URL with a body that includes these parameters in JSON format:

  • client_id - you application's client id
  • client_secret - your applications's client secret
  • code - the code that you have received in the previous step
  • redirect_uri - your application's redirect URI
  • grant_type - "autorization_code"

If all of the data you have send is valid, you will receive JSON including this data:

  • access_token - the token you will use to make requests to our API. You will have to pass it as a header in this format {"Authorization" : "Bearer {your_token}"}    
  • refresh_token - this token you will have to pass to our API's token URL with grant_type: "refresh_token" to get a new access_token when this one expires.

Running example of the OAuth process can be found here: https://github.com/codemotionapps/flask-api-example

If you have any questions, feel free to ask us at hi@ora.pm 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us