Skip to content

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

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')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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