Making HTTP Requests

How to integrate Robin's API without an SDK

No SDK for your language of choice? You can interact with our RESTful API with just about any HTTP library. We've provided cURL request examples alongside the JS SDK examples to make things easy.

We have SDK's for additional languages in the roadmap, and we'll update here as those launch.



Using the OkHttp library from Square:

private final OkHttpClient client = new OkHttpClient();
public void run () throw Exception {
  // prepare the request
  Request request = new Request.Builder()
    // Get space presence
    // Include the Authorization header to let Robin know who you are
    .header("Authorization", "Access-Token [[app:Token]]") 
  // perform the request
  client.newCall(request).enqueue(new Callback() {
    // this gets called when the response is received
    public void onResponse(Response response) throws IOException {
      // Output the response