Skip to content
This repository was archived by the owner on Dec 7, 2022. It is now read-only.
This repository was archived by the owner on Dec 7, 2022. It is now read-only.

Why do we need api_key in Message? Shouldn't it use the api_key in Client? #4

@jannavarro

Description

@jannavarro

I initialized Client class by passing an api key in its constructor.
var client = new Client(apikey);

Calling Client.SendAsync with a Message having a null or empty api key will return a BadRequest. If I do set the api key in the Message it works. Isn't the point of having the api key in the client to use that api key across all messages?

I'm thinking that instead of an api key per message it makes more sense to have it per Client instance. A message should focus on what it is - a message and not concern itself with the api key. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions