• Daniel Ramirez Perez
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi guys. I'm trying to make a GET method from apex to generate an Access Token. I have to pass the access token to a URL in order to retrieve a JSON response. I don't know how to pass the client Id, client secret, endpoint, scope and grant type in apex.
Then I will pass the URL and access token to get the JSON I mentioned. 
Please can anyone help me with the code or how to set the Named Credentials. I've been looking for an example but all of them point to the Salesforce connected app.
I'm attaching a capture of the same in Postman. I tryed first in postman and it works.
Thanks in advance.


I want to replicate this in Salesforce
Hi guys. I'm trying to make a GET method from apex to generate an Access Token. I have to pass the access token to a URL in order to retrieve a JSON response. I don't know how to pass the client Id, client secret, endpoint, scope and grant type in apex.
Then I will pass the URL and access token to get the JSON I mentioned. 
Please can anyone help me with the code or how to set the Named Credentials. I've been looking for an example but all of them point to the Salesforce connected app.
I'm attaching a capture of the same in Postman. I tryed first in postman and it works.
Thanks in advance.


I want to replicate this in Salesforce