For making and verifying requests, you need these values:
secret
- received from Comeet when approved as a Comeet partner. See Getting Started: Integration Partners.api-key
- received from a Comeet customer when the integration is activated.
Verify a request from Comeet
When Comeet makes a request to an endpoint that you provide you must verify the request.
-
The
Authorization
header is included with the HTTP requests using the following syntax:
Authorization: Bearer <token>
-
Decode the
token
with yoursecret
using JWT. The result must be identical to theapi-key
. You can use one of the many JWT libraries available online. If it is not identical then fail the request.
Make a request to Comeet
To make a request to Comeet you must authorize the request.
-
Generate a
token
by encoding the account'sapi-key
with yoursecret
using JWT. You can use one of the many JWT libraries available, see code examples here. -
Include the
Authorization
header using the syntax:
Authorization: Bearer <token>