I would like to connect my information system to Planning PME via API. For that, I need to get a token.
With a OAuth 2.0 protocol, I know how to do but the protocol is not a OAuth 2.0 protocol. I just have a API key and my login ID
Perhaps I have to enter these parameters in a HTTP Caller?
I attach the API Documentation.
Thanks for your help
Best answer by danminneyatsaf
lribot wrote:
I still have problem with this API. So I call the Planning PME Support and a guy, who works with Postman, send me the request in JSON file.
But now I dont' know how translate this JSON request in a HTTPCaller.
I try to do this but it doesn't workThanks for your help
@lribot You've just about got your parameters correct. Instead of inputting the "body" into the Query Parameters, you can add it to the Body > Upload Body Parameter. You'll also need to make sure you set the Body > Content Type parameter to URL Encoded. I've attached a sample workspace to this comment. You might need to run through the parameters and the Upload Body first to make sure there's no typos.
You can use an HTTPCaller to POST your login info to the "/token" URL. A JSONExtractor or JSONFlattener can then be used to extract the token from the response body.
In subsequent calls to the API, add an Authorization header to the Headers section of the HTTPCaller, and set the Value to 'Bearer <token value>'
From the API docs, it looks like you will also need to add an X-APPKEY header to all the HTTPCaller requests (including the initial authorization) with the value set to your application key.
I still have problem with this API. So I call the Planning PME Support and a guy, who works with Postman, send me the request in JSON file.
But now I dont' know how translate this JSON request in a HTTPCaller.
I try to do this but it doesn't workThanks for your help
@lribot You've just about got your parameters correct. Instead of inputting the "body" into the Query Parameters, you can add it to the Body > Upload Body Parameter. You'll also need to make sure you set the Body > Content Type parameter to URL Encoded. I've attached a sample workspace to this comment. You might need to run through the parameters and the Upload Body first to make sure there's no typos.
@lribot You've just about got your parameters correct. Instead of inputting the "body" into the Query Parameters, you can add it to the Body > Upload Body Parameter. You'll also need to make sure you set the Body > Content Type parameter to URL Encoded. I've attached a sample workspace to this comment. You might need to run through the parameters and the Upload Body first to make sure there's no typos.
@lribot You've just about got your parameters correct. Instead of inputting the "body" into the Query Parameters, you can add it to the Body > Upload Body Parameter. You'll also need to make sure you set the Body > Content Type parameter to URL Encoded. I've attached a sample workspace to this comment. You might need to run through the parameters and the Upload Body first to make sure there's no typos.
@lribot You've just about got your parameters correct. Instead of inputting the "body" into the Query Parameters, you can add it to the Body > Upload Body Parameter. You'll also need to make sure you set the Body > Content Type parameter to URL Encoded. I've attached a sample workspace to this comment. You might need to run through the parameters and the Upload Body first to make sure there's no typos.
Hope this helps!
Hey @lribot, are you able to provide a copy of your workspace so I can take a look at the HTTPCaller parameters? Alternatively you could send a screenshot of the parameters with any sensitive information removed.
Apologies for the late reply as I was out of the office for a few weeks.
Additionally, API keys should be kept secure and not shared publicly, as they grant access to your account's resources. When using API keys, it's essential to follow best practices for encryption and storage to prevent unauthorized access. Furthermore, in the context of B2B API meaning, some APIs offer token-based authentication, which provides a more secure and flexible way to manage access and permissions. Token-based authentication involves exchanging a unique token that expires after a certain period, enhancing security compared to static API keys. Overall, the choice of authentication method, whether in B2B API scenarios or others, depends on the level of security and control needed for your API interactions.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.