cancel
Showing results for 
Search instead for 
Did you mean: 

[ASK] Get Authorization Bearer Token

former_member76287
Participant
0 Kudos

Dear Expert,

i have question , how can i add "Bearer" in our XPATH ?

this is makes issue for my authentication since it was need authorization bearer

here is my design

this is when i do manual to get authorization token

{"code":0,"expire":2765,"msg":"ok","tenant_access_token":"t-7c2601499925817e5e69a4d47761d0eae8983f0c"}

thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member76287
Participant
0 Kudos

Hi carlosrodrigop

thanks for your information.

but the problem is this token is validity for 2765 seconds

and need to be refreshed.

is there any information that you can give to me ?

thank you

former_member608139
Active Participant
0 Kudos

do you need call the i-flow artifact by the orher one what you will access using this token every time

or use a storeged to maintain this token.

Storege ( https://blogs.sap.com/2020/01/04/how-to-read-write-sap-cpi-datastore-from-groovy/ )

I´ll do using a internal integration process what i Called if the message return a exception during the first attempt to connect and update the data storege after the token was changed.

The calling webservice with the token I´ll doing in other integration process called after the new token, or the principal token uf no error occurs

former_member76287
Participant
0 Kudos

carlosrodrigop
i'm prefer in my iflow

i'm not knowledge too much on the data storage, so is there any solution to put in same iflow ?

thank you

former_member608139
Active Participant
0 Kudos

You can do the way like this.

Create a principal Iflow calling to internal i-Flow process

The first one is the process to get the token and the second one to access the webservice with the token.

in the second one, create a exception subprocess where you will call the create token ( first process ) and the proceed to access the same webservice getting the answer from webService. I did a similar process just for redirection as can you see in my blog

https://blogs.sap.com/?p=1033028

But in this case you always try to get a token first, the better way is store this token and just get a new one if the exception to access the webservice occurs

former_member608139
Active Participant
0 Kudos

Sorry about the last answer.. You just need create a Header parameterr before the request message as can you see below, use a content modifier pattern and create this