Updated on Sep 22, 2023

2

min read

API Key

Authentication is required to access certain features of the Movies API. This document outlines the various authentication methods available and provides instructions on how to authenticate your requests.

API Key Authentication

API key authentication is the primary method for authenticating with the Monolito Movies API. Follow these steps to obtain an API key and use it for authentication:

  1. Sign Up: If you haven't already, sign up for an account on the Monolito Movies platform.

  2. Access Your API Key: After signing in, navigate to your account settings to find your API key.

  3. Include API Key: Include your API key in the header of your API requests using the following format:

    Authorization: Bearer YOUR_API_KEY


  4. Example (JavaScript): Here's how to include your API key in a JavaScript fetch request:

    const apiKey = "YOUR_API_KEY";
    const apiUrl = "https://api.moviesapi.com/v1/your-endpoint";
    
    fetch(apiUrl, {
      method: "GET",
      headers: {
        Authorization: `Bearer ${apiKey}`
      }
    })
      .then(response => response.json())
      .then(data => {
        console.log("API Response:", data);
      })
      .catch(error => {
        console.error("Error:", error);
      });

OAuth2 (Optional)

In addition to API key authentication, we also support OAuth2 for more advanced authentication scenarios. To use OAuth2, refer to our OAuth2 documentation for detailed instructions.

Access Levels

Different API endpoints may require different levels of authentication or may be accessible only to premium users. Keep your API key and authentication tokens secure. Do not share them publicly or expose them in client-side code.

By following these authentication guidelines, you can access the Movies API and unlock its features for your application or integration.