https://linen.dev logo
#singer-tap-development
Title
# singer-tap-development
o

oscar_gonzalez

10/12/2021, 8:32 PM
Hello All, I am developing a new tap-source using the cookie cutter. The auth is an API Key and I put the key in the Meltano.yml file. It is failing. Does anyone knows where do I have to put the key value or how is this implemented? client.py
Copy code
@property    
    def http_headers(self) -> dict:
        result = super().http_headers   
        #api_token = "123ABC"
        api_token = self.config.get("api_token") 
                
        auth = b64encode(f"{api_token}".encode()).decode()

        result["Authorization"] = f"Basic {auth}"  
    
        return result
meltano.yml
Copy code
config:
      api_token: 123ABC
      #start_date: '2010-01-01T00:00:00Z'
If a remove the commented linke in the client.py, it will connect without an issue.