Forum Stats

  • 3,678,553 Users
  • 7,135 Discussions
  • 12,061 Comments

Discussions

getting 401 – Unauthorized calling Invoke callbacks

user8659414
user8659414 Posts: 8 Green Ribbon
edited May 19, 2021 2:47PM in Social Groups

Hi,

We are trying to call two endpoints after Invoke: productImport and onCompletion but we are getting 401 – Unauthorized response.

Invoke data (from AMS/Product):

Request content: {"instanceContext":{

"appId":"2e39c527-5797-4887-a5c6-23348211ab45",

"appVersion":null,

"installId":"dd13afce-0abe-41d0-bcfd-1b0a53ddd3bd",

"instanceId":"0d0cbd9a-cbf7-485d-8a34-ee3e522857f1",

"serviceId":"060f631b-8621-4d51-8adf-bc90ebc375fe",

"tenantId":"80670",

"productId":"6798e522-deb5-488f-bf22-c29e13254b8f",

"maxPushBatchSize":10000,

"secret":"9162555b-bff5-4acf-878d-b78dadb31186-b848676a-3d12-49db-8b96-a3fab1384441",

[...]

My productImport data:

Endpoint (from Invoke call): https://rest002.rsys9.net/rest/appcloud/v1/tenants/80670/datasets/4941c422-c21d-4302-b384-18914fb7533a-20210518-735809

Authorization Bearer (signed with Invoke provided secret) eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjEzMTY1ODEsIm5iZiI6MTYyMTMxNjU4MSwiZXhwIjoxNjIxMzE2NjQxLCJpc3MiOiIyZTM5YzUyNy01Nzk3LTQ4ODctYTVjNi0yMzM0ODIxMWFiNDUiLCJhdWQiOiIwZDBjYmQ5YS1jYmY3LTQ4NWQtOGEzNC1lZTNlNTIyODU3ZjEiLCJzdWIiOiJkZDEzYWZjZS0wYWJlLTQxZDAtYmNmZC0xYjBhNTNkZGQzYmQiLCJvLmEucC5jdGVuYW50SWQiOiI4MDY3MCJ9.e0MAF9bJAoj4GdeigdiAAEL0PRpkHwodY8_ID3lGsCg

Request Body (json type):

[{"fieldDefinitions":[{"name":"appcloud_row_correlation_id","dataType":"Text","width":4,"unique":false,"required":false,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":null,"format":null,"resources":null},{"name":"appcloud_row_status","dataType":"Text","width":500,"unique":false,"required":false,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":null,"format":null,"resources":null},{"name":"appcloud_row_errormessage","dataType":"Text","width":5120,"unique":false,"required":false,"readOnly":null,"minimumValue":null,"maximumValue":null,"possibleValues":null,"format":null,"resources":null}],"dataSet":{"id":"4941c422-c21d-4302-b384-18914fb7533a","rows":[["15522019949","28001929","1621225151"],["8529709","28001949","1621225151"],["15519835929","28001969","1621225151"],["2149","28001989","1621225151"]],"size":null}}]

I tried various PHP libs, including JWT-Framework and Firebase-JWT, with no success.

Decoded JWS: (from https://www.jsonwebtoken.io/)


Can you help?

Post edited by user8659414 on

Answers