Skip to content

Authentication is failing with 401 due to an incorrect login date #1

@ctimbreza

Description

@ctimbreza

I receive 401 errors when running the sample code. Looks like the solution is to ensure that the request date within the X-Avangate-Authentication header is in UTC.

Per the documentation the REQUEST_DATE_TIME which is included in the X-Avangate-Authentication header needs to be in UTC.

The AvangateRestClient is constructing the login date using the following statement which is not in UTC time.
Time.now.strftime("%F %T")

This line should be changed to this
Time.now.utc.strftime('%F %T')

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