Skip to content

Accessing the API #12

@ErikFisherGitHub

Description

@ErikFisherGitHub

How should I pass the Account API ID and Account API Key to use the API?

I am trying like so:
.ENV file

ACCOUNT_ID = os.getenv('XE_ACCOUNT_ID')
API_KEY = os.getenv('XE_API_KEY')

Function:

    response = requests.get(
        f"https://xecdapi.xe.com/v1/currencies.json?name={ACCOUNT_ID}&password={API_KEY}"
    )
    data = response.json()

I have used "api_key" and "account_id" also.

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