Get Started

Step 1: First things first

To get started with using the HiDrive API you’ll need App Credentials for your project. You get those by using our application form Get an API Key.

After you have submitted your application, we will check and unlock your project within the next 72 hours and send you a pair of client_id and (in most cases) client_secret to the given email address.

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.