Webhook to AWS API Gateway error: {"message":"Forbidden"}

0

Hi all,
Some basic information on what I want to manage in AWS:

Goal: I have a Particle board. This Particle board is an arduino like board with a GSM modem. This board sents data to the Particle Cloud. In the Particle Cloud I want to use a webhook to send the data to AWS API Gateway. After this a lambda function should insert the received data into a dynamoDB.

What I already did:

Problem:

  • request looks like this (postman):
    GET /prod/data HTTP/1.1
    x-api-key: MY_API_KEY
    User-Agent: PostmanRuntime/7.26.3
    Accept: /
    Postman-Token: 326808aa-a0c0-49fa-952e-bbac3ce2fe97
    Host: XXXXXXXXXX.execute-api.eu-central-1.amazonaws.com
    Accept-Encoding: gzip, deflate, br
    Connection: keep-alive

  • response (postman):
    Date: Thu, 13 Aug 2020 15:36:32 GMT
    Content-Type: application/json
    Content-Length: 23
    Connection: keep-alive
    x-amzn-RequestId: 12a821d3-77be-46d5-8889-b03fd98a1942
    x-amzn-ErrorType: ForbiddenException
    x-amz-apigw-id: RNugJGJWliAFlHQ=

{"message":"Forbidden"}

When I'm disabling the need of the API Key the API is working as expected.
I'm not sure which step and/or setting I might have missed.
Does somebody can help me?

EDIT: Here is the Particle Webhook documentation. But I think it's not necessary as Postman also fails. So it is certainly not a webhook error. :)
https://docs.particle.io/reference/device-cloud/webhooks/#sending-complex-data

Best,
Tim

Edited by: T1mS on Aug 13, 2020 8:41 AM

Edited by: T1mS on Aug 13, 2020 8:43 AM

Edited by: T1mS on Aug 13, 2020 8:45 AM

Edited by: T1mS on Aug 13, 2020 8:46 AM

T1mS
gefragt vor 4 Jahren1163 Aufrufe
1 Antwort
0

Hi,
I found my mistake. The problem was, that I forgot to asign the API Key to an Usage Plan.
Now it is working as expected.

T1mS
beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen