• Step 2: Handle authentication with OAuth2

    After you get your client_id and client_secret from us, you can connect to our OAuth 2.0 authentication server. The target is to obtain an access_token with which you can access the HiDrive API. Detailed information about our OAuth 2.0 server can be found here.

    If you registered a "server" or "native" app

    open/redirect a browser-window to
    https://www.hidrive.strato.com/oauth2/authorize?client_id=<client_id>&response_type=code&scope=admin,rw
    Enter your Test-Account login information, allow access and the page will redirect to your registered redirect_uri, containing a code parameter

    To get the access_token, you'll need to make a POST request using this code:
    curl -X POST --data "client_id=<client_id>&client_secret=<client_secret>&grant_type=authorization_code&code=<code>" \
     https://www.hidrive.strato.com/oauth2/token
    The result-json will contain an "access_token" ---> you're done!

    If you registered a "browser" app

    open/redirect a browser-window to
    https://www.hidrive.strato.com/oauth2/authorize?client_id=<client_id>&response_type=token&scope=admin,rw

    Enter your Test-Account login information, allow access and the page will redirect to your registered redirect_uri, containing an access_token parameter ---> you're done!