API Authorization & Token base API call

Hi Experts, @val

I need your expert advice, to achieve below things.

I have 2 API,

  1. Authentication - It generate the token
  2. GetRobotDetails - It uses the above token to make successful API call.

can you please help how should I create a .conf file to do this?

below are the details:

  1. Authentication API details:

End Point URL : https://XXXXXX/api/Account/Authenticate
Header: Content-Type => application/json
Body => { "tenancyName": "TenantName", "usernameOrEmailAddress": "username", "password": "pass"}

it will generate the below response

{
"result": "1zuEGL72hKwMO5YZ6AQvpFmHoZXwnOkzYJFxeK6q8V9OEb1VcK_xzOl1Qq2P99oJ_XNlBnJoHvAqTW6Pp2NjU7RnEKm1r1dnv3DNkBhotj6buJte6EJedKQCcbl2iZSB6kmnJ4XZaa4rHPJ-A_1Z2-uRqVjAH095uhvA9b07a_X1AwF-lWErcpgr93MuQtzc-scOoyQj8qKb3e0XkiEXktVAFhnW1mY2yxrTTRsocEB8NXxYXz3Pr4zMT6HPEmrC_hefhNvAYe9QMiwp1Ps706rQKurZYUWfyU0PZ0oXEeuWj7IaK_MwksYSzqpyPkwI5ngxXmro7V93K7zB73RYSB4WKSbIshYp76iGWcOKNViBkf7SV0pkjHKzhGfP728BDk6EFoBkTLxRjMeXVMSv1rVPZF57vtWlZrVCdEyBq0rUwQB91io3zrbhjgNQZ4eIy-wMkYLD_7G0PSlitCDqfV22JT3Y6niXoSZ_6MFsnKKpqcIwURKrUb7wnU6aB0y8MVaCHw",
"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,
"__abp": true
}

  1. GetRobotDetails
    End Point URL: https://XXXX/odata/Robots
    Header:
    Content-Type => application/json
    Authorization => Bearer aboveToken(result tag)

Please help me to create .conf.

Thanks in advance!!

It's not clear to me what you are doing here sorry.
Where is the token from? Where do you want to make the API call from?

(Also please don't ping people that aren't already part of your thread.)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.