import requests


def get_paste(id: str, api_key: str, user_key: str) -> str:
    """returns the content of a paste

    Arguments:
        id {str} -- the id of the paste.

        api_key {str} -- the api_key of the application.

        user_key {str} -- the user_key of the user you want the paste for.

    Returns:
        paste content {str} -- Returns the content of the paste.

    Raises:
        ValueError: Invalid paste id
        ValueError: Bad API request, invalid api_dev_key
        ValueError: Bad API request, invalid api_user_key
        ValueError: Bad API request, invalid permission to view this paste or invalid api_paste_key
    """
    r = requests.post("https://pastebin.com/api/api_raw.php",
                      data={
                          "api_dev_key": api_key,
                          "api_paste_key": id,
                          "api_option": "show_paste",
                          "api_user_key": user_key
                      })

    try:
        r.raise_for_status()
    except:
        raise ValueError(r.text)

    return r.text