function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nelson Chisoko 15Nelson Chisoko 15 

[Beginner] - Calling out an external web service API using REST services and OAUTH

Hello Guys

I have been struggling to find a way on how I can call an external web service via apex  which uses OAUTH via REST services. Basically I am trying to access an API on https://api.envisionme.co.za/v1/docs#oauth. Now they use OAUTH to grant access to make calls such as retrieving jobs, candidates etc. They have set up an app on their side with a client_id and a client_secret. Now based on their doc Im suppose to follow a process: make a login call, get a token etc...

I have absolutely no idea how to do this...how do I set up an apex class that will

    1. Login and get the token
    2. Enable me to make those Http POST, GET etc methods

Because ultimately I wanna have a trigger that will call on it to retrieve the data from that external web service.

I do know a bit of apex but I am a rookie when it comes to integration stuff. Please help if you can.