Skip to main content

API Key vs. Bearer Token for Data Push API

 

Hi all,

 

We are trying to push data towards the EMS using the Data Push API. In our tests with Postman, we were able to do this, but we found out that the API key in the EMS should be used as a Bearer token.

In the application we use, a Bearer token can only be obtained by requesting it from a authorization endpoint.

Moreover, we cannot use the Celonis API key as a REST API key authorization, since you need a key name for that (and this is not the key name in the EMS).

Has someone of you experienced the same issue, and is there a workaround for it?

 

Kind regards,

Jan-peter

Hi Jan-Peter

 

Not sure if I fully understand the question, but you can use both an App- and ApiKey with the Data Push API.

API Key: 'authorization': "Bearer <API Key>"

API Key: 'authorization': "AppKey <APP Key>"

Hope this helps.

 

Best

Johannes


Hi Johannes,

 

First of all, thanks for thinking along.

We found out that for the Bearer method, a personal token is needed (can be created at 'edit profile').

For the API Key, we understood that a key created in the team settings should be used. Unfortunately we are still not able to do this. Do you have an idea what we are doing wrong?

 

Kind regards,

Jan-peter


Hi Jan-Peter

 

you can do this in the Application tab of the team settings.

AppKey creation 

Best

Johannes


Hi Johannes,

 

We have created it there indeed, but that key didn't work in the request we made. In the mean time I found out what the problem was. When selecting 'API Key' authorization in Postman, the prefix 'Authorization' was not parsed, see the example below.

 

curl --location --request GET 'https://<env_name>.celonis.cloud/integration/api/v1/data-push/<pool_id>/jobs/' \\

--header 'Authorization: Bearer <user_level_token>' --> Returns a Job ID with details

 

curl --location --request GET 'https://<env_name>.eu-1.celonis.cloud/integration/api/v1/data-push/<pool_id/jobs/' \\

--header 'AppKey: <team_level_token>' --> Returned a 200 Error

 

 

I now fixed it, by entering it manually, but not sure if this is supported in the source system we push the data from. Our journey goes on ;)

 

Thanks again for the help.

 

Best,

Jan-peter

 

 


If more people are looking into this, the correct request is:

 

curl --location --request GET 'https://<env_name>.eu-1.celonis.cloud/integration/api/v1/data-push/<pool_id/jobs/' \\

--header 'Authorization:  AppKey <team_level_token>' 


Hi Johannes,

 

We have created it there indeed, but that key didn't work in the request we made. In the mean time I found out what the problem was. When selecting 'API Key' authorization in Postman, the prefix 'Authorization' was not parsed, see the example below.

 

curl --location --request GET 'https://<env_name>.celonis.cloud/integration/api/v1/data-push/<pool_id>/jobs/' \\

--header 'Authorization: Bearer <user_level_token>' --> Returns a Job ID with details

 

curl --location --request GET 'https://<env_name>.eu-1.celonis.cloud/integration/api/v1/data-push/<pool_id/jobs/' \\

--header 'AppKey: <team_level_token>' --> Returned a 200 Error

 

 

I now fixed it, by entering it manually, but not sure if this is supported in the source system we push the data from. Our journey goes on ;)

 

Thanks again for the help.

 

Best,

Jan-peter

 

 

Hi Jan-Peter

 

a 200 code is a success message, so this is as it should be.

 

Best,

Johannes


Hi Jan-Peter

 

a 200 code is a success message, so this is as it should be.

 

Best,

Johannes

Hi Johannes,

 

Sharp, that one belongs to the upper one, the lower one returns a 403 "unauthorized" error. Unfortunately I cannot edit the post.


Hi Jan-Peter

 

a 200 code is a success message, so this is as it should be.

 

Best,

Johannes

ah in that case you need to give the proper permissions to the app key. you can do this on the permissions page, just search for the application key's name.


Hi Jan-Peter

 

a 200 code is a success message, so this is as it should be.

 

Best,

Johannes

Well in this case, that was not the problem, it would then return "Permission Denied".

The issue was that Postman did not added "Authorization: " as prefix when the authentication method 'API Key' was selected. I fixed this by disabling authentication and stated the header manually as displayed below (and what you suggested in a earlier post)


Reply