Befehle des Menübands überspringen
Zum Hauptinhalt wechseln

​​​​​​​​


​​​​​​​​​​​​

​​Become a Developer

We are happy that you would like to invest your time and talent to create an app for RWTH Aachen University. We want to keep an attractive variety of apps for all members of the university. 

Before you can start developing your app for RWTH Aachen University you have to register as a developer. We need the following information to register you as a developer:

  • Contact information including name and email address.
  • Relationship with RWTH Aachen.
  • Working title of your application.
  • Short description of your app (Couple of sentences is enough).

If you want to take advantage of the L2P API in your application, please contact CiL (elearning@rwth-aachen.de). We will contact ITC and provide you with an app key. 

After registering with us, you will receive an app key. This key is used to identify your app when communicating to the different information services at RWTH Aachen. The app key is only intended for your app and it should not be passed to anyone else. Place the app key at a safe place and handle it with special care e.g. do not upload it to publicly visible source code repositories. Also please use your app key only for one app. If you are developing multiple apps we will gladly issue multiple app keys to you.



Guidelines

The guidelines define certain quality standards, basic design rules, and security rules to protect the user and her personal data. All apps and tools used in the context of RWTH Aachen University should follow these guidelines.

We want to support good and innovative apps from initial idea until release to the public, and we offer our help during the development of your app with templates and samples.

The guidelines are continuously upgraded. Each new app is a specific ecosystem and it might raise different points, situations, and questions that have not been anticipated. The guidelines will grow and receive update with each new occurrence. Please, do not hesitate to contact us if you have any questions concerning the guidelines. Take a look at them every once in a while, to make sure you and your app is up to date with them.


Further Information:​

​​​

​​Full Example with Referen​​ce Client


​​string url = await L2PAPIClientPortable.AuthenticationManager.StartAuthenticationProcessAsync();​ // Start Authorization Process - open this url in browser!

bool done = false;

Thread.Sleep(5000); // you may use different methods for waiting like Task.Delay

L2PAPIClientPortable.AuthenticationManager.CheckAuthenticationProgressAsync(); // Update State of client

done = (L2PAPIClientPortable.AuthenticationManager.getState() == L2PAPIClientPortable.AuthenticationManager.AuthenticationState.ACTIVE);

​​​​​var courses = await L2PAPIClientPortable.api.Calls.L2PviewAllCourseInfoByCurrentSemester();​ // Get All Information about courses of the current semester


OAuth2 Code Example with NodeJS​​​:

var auth = require("l2pAuth");
auth.setClientID('YOURCLIENTID.app.rwth-aachen.de')

//obtain user code
auth.obtainUserCode(function(response){
console.log(response.verification_url); //Show this url to your user
device_code = response.device_code; //save device code
})

//...
//Make sure the user has now verified the app
//...

//get access tokens
auth.getTokens(device_code,function(response){
    //save tokens
    acessToken = response.access_token;
    refreshToken = response.refresh_token;

    //validate token and show output
    auth.tokenValidation(acessToken, function(response){
        console.log(response);
    });
});​

​​​​​OAuth2 Co​​de Example for Android

    private void authorizeApplication(String clientId) throws IOException,JSONException {
        Map<String,String> postBodyParameters = new HashMap<>();
        postBodyParameters.put(getString(R.string.oauth_client_id),clientId);
        postBodyParameters.put(getString(R.string.oauth_scope_of_acccess),getString(R.string.scope_of_access));
        JSONObject responseJSON = new JSONObject(httpClient.makePOSTRequest(postBodyParameters,getString(R.string.oauth_endpoint)));
        Log.i(TAG, responseJSON.toString());
        deviceCode = responseJSON.getString("device_code");
        intervalForPollingOAuthTokens = responseJSON.getInt(getString(R.string.oauth_polling_interval));
        Uri uri = Uri.parse(responseJSON.getString(getString(R.string.oauth_verification_url)) + "?q=verify&d=" + responseJSON.getString(getString(R.string.oauth_user_code))); // encode the verification url
        // along with the user code for more details look at the OAuth documentation of the ITC RWTH Aachen
        authorizationInProgress=true;
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(intent);
    }

    private boolean obtainTokensFromOAuthServer(String clientId) throws IOException, JSONException{
        Map<String,String> postBodyParameters = new HashMap<>();
        postBodyParameters.put(getString(R.string.oauth_client_id),clientId);
        postBodyParameters.put(getString(R.string.oauth_device_code),deviceCode);
        postBodyParameters.put(getString(R.string.oauth_grant_type),getString(R.string.oauth_device_grant_type));
        JSONObject responseJSON = new JSONObject(httpClient.makePOSTRequest(postBodyParameters,getString(R.string.oauth_token_endpoint)));
        Log.i(TAG, responseJSON.toString());
        if(!responseJSON.optString(getString(R.string.oauth_access_token)).isEmpty()) {
            accessToken = responseJSON.getString(getString(R.string.oauth_access_token));
            refreshToken = responseJSON.getString(getString(R.string.oauth_refresh_token));
            return true;
        }
        else{
            return false;
        }
    }