Skip to content

Token generation via extension-sdk common/token.mjs returns 400 "Invalid json message received" #37

@Janajith-D

Description

@Janajith-D

While using the Akeneo extension-sdk example implementation for generating an OAuth token (common/token.mjs), the request consistently fails with a 400 Bad Request response.

The error returned by the Akeneo API is:

{"code":400,"message":"Invalid json message received"}

However, the same request works successfully when executed via Postman using the equivalent curl request. This suggests there may be an issue with how the request payload is constructed or sent in the SDK example.

Impact

Due to this error, the SDK workflow commands do not complete successfully.
Commands such as:

make start
make get-token
make update-dev

failed during the token generation step.

Environment

  • Akeneo Edition: Serenity
  • NodeJS Version: 23.1.0
  • OS: Windows

Debug Output

The payload being sent appears correct when inspected in the debugger.

image

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