Get Started

Step 1: First things first

To get started with using the HiDrive API you’ll need to register your application to obtain a client credential for your project.

After you have submitted your application, we will check and unlock your project within the next 72 hours and provide a client credential to the registered email address.

  Looking for a HiDrive S3 access key and secret? Go to the HiDrive S3 management console

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://my.hidrive.com/client/authorize?client_id=&response_type=code&scope=admin,rw

Enter your 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_secret=&grant_type=authorization_code&code=" \ https://my.hidrive.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://my.hidrive.com/client/authorize?client_id=&response_type=token&scope=admin,rw

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

Step 3: Your first API request

For your first API-Request there are just a few things to know:

1. SSL only! We require all requests to the API to be made over SSL (https:// not http://).
2. The access_token must be sent inside the Authorization: Bearer header of your request.

Now let’s get to know something about your app itself, using the GET /2.1/app/me endpoint:

curl -X "GET" \ 
-H "Authorization: Bearer " \ 
-d "fields=id,name,created,refresh_token.expires" \ 
https://api.hidrive.strato.com/2.1/app/me

 

A detailed description of all API endpoints can be found in our HTTP API Reference.