Search code examples
salesforce

Where can I get the Session ID to send a request to Fielo API?


I am trying to get user transactions from the Fielo API. I have been following the documentation, however, I see that they require SESSION_ID in the request header. Which session ID are they referring to exactly and where can I get the session id?


Solution

  • This seems to be "normal" Salesforce REST API, piece of custom Apex code exposed as a webservice.

    Just for getting familiar with it you could try connecting via https://workbench.developerforce.com/login.php. Once you log in there's "REST explorer" in one of the menus in the upper right. Workbench will silently pass the session id for you.

    Once you got the hang of it - you can use multiple ways to get the session id. There's SOAP API's login() call if you want to download the WSDL file (Setup -> API). There are many OAuth2 flows to choose from, they all return "access_token" although they may need multiple steps (the "username password" flow is straightforward but least secure).

    A lot depends on where do you need to use it. Web app? Mobile app? Desktop app written in Python/Java/C#/PHP (there are ready-made libraries for connecting to SF if you don't feel like hand-crafting the HTTP requests)... If you absolutely do want to hand-craft - https://openidconnect.herokuapp.com/ is pretty cool, check some other answers on StackOverflow that mention it and logging in to SF in general.