Skip to docs content

REST API with Flutter

Dart has a composable, Future-based library for making HTTP requests. You can simply use this to connect with apito’s rest api endpoints. Here is an example below

Using Dart’s standard http library

Tip:

Always remember to replace API_SECRET in the Bearer Token and project-id in the URL with the correct values from the Apito console.
If you are unsure where to find your API secrets and endpoints for your project, visit this page.

    String token = '<API_SECRET>';
    final response = await http.get(url, headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer $token',
    });
    print(response);