tag:blogger.com,1999:blog-4216096443336193383.post2880521459991646714..comments2024-03-28T14:08:02.119+05:30Comments on Amit Salesforce | Salesforce Tutorial: Test Salesforce API by Postman Rest Client | Postman and Salesforce | Calling APEX Rest service using Postman| OAuth 2.0 Amit Chaudharyhttp://www.blogger.com/profile/12828839053069750596noreply@blogger.comBlogger45125tag:blogger.com,1999:blog-4216096443336193383.post-20434068201081726922023-11-15T13:31:42.731+05:302023-11-15T13:31:42.731+05:30This comment has been removed by the author.LBM Solutionshttps://www.blogger.com/profile/11095472617493126752noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-66023122164310274392023-10-29T10:36:05.413+05:302023-10-29T10:36:05.413+05:30Were you able to fix it ?Were you able to fix it ?RAHUL KAPOORhttps://www.blogger.com/profile/12924842244361436837noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-66303291768502327372023-05-08T17:14:53.371+05:302023-05-08T17:14:53.371+05:30The post is very informative and helpful. Thanks F...The post is very informative and helpful. Thanks For Sharing.. <a href="https://www.connectinfosoft.com/rest-api-development-service/" rel="nofollow">Backend API Development</a>connectinfosofthttps://www.blogger.com/profile/06361004287293418825noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-8839748736104665372023-04-10T12:13:11.829+05:302023-04-10T12:13:11.829+05:30"BEP20 Token is a unique token standard creat..."BEP20 Token is a unique token standard created to classify and describe tokens on the Binance Smart Chain. It is being used in numerous blockchain, NFT and DeFi applications and is becoming increasingly popular. Coin Developer India is a leading <a href="" rel="nofollow">BEP20 Token Development Company</a><br /> offering cost-efficient services. BEP721 is a modification of ERC721 and BEP1155 combines BEP-20's fungibility and BEP-721's non-fungibility."<br />coindeveloperindiahttps://www.blogger.com/profile/16714914533832671857noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-76892234968467624682023-04-04T15:49:21.878+05:302023-04-04T15:49:21.878+05:30thank u so much. Good info
Online Test Seriesthank u so much. Good info<br /><a href="https://hunarindia.org.in/testseries" rel="nofollow">Online Test Series</a>Online Educationhttps://www.blogger.com/profile/10335873072201595802noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-30298223497617492292023-02-17T11:33:14.493+05:302023-02-17T11:33:14.493+05:30Your blog is an innovative initiative in the world...Your blog is an innovative initiative in the world of blogging. You have a unique imagination and have come up with some of the most creative ideas I've ever seen. Best of luck for your blogging journey. Keep engaging us! <a href="https://golf-marketingpro.com/property-rent/" rel="nofollow">2 Bedroom House for Rent</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-65362398761007029982022-10-14T18:46:27.840+05:302022-10-14T18:46:27.840+05:30Thanks for sharing such a good and informative con...Thanks for sharing such a good and informative content to all of us.<br /> <br /><a href="https://www.payallovefriendship.com/" rel="nofollow"> Dating site in delhi ncr </a><br /><br /><br /><br />tarun dixithttps://www.blogger.com/profile/03859861631891645976noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-18958773859365674402022-09-27T14:20:29.027+05:302022-09-27T14:20:29.027+05:307050507535 Best website designing services in Vais...7050507535 Best website designing services in Vaishali Ghaziabad<br /><br /><br /><a href="https://https://d2web.in/" rel="nofollow">website development services company in Vaishali Ghaziabad</a>tarun dixithttps://www.blogger.com/profile/03859861631891645976noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-74262877570116946162022-09-27T12:19:42.200+05:302022-09-27T12:19:42.200+05:30website development services company in vaishali ...<br /><a href="https://https://d2web.in/" rel="nofollow">website development services company in vaishali ghaziabad</a><br /><br />Acelema It Solutionshttps://www.blogger.com/profile/10017260421059043612noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-84264803355826597232022-07-12T16:41:04.443+05:302022-07-12T16:41:04.443+05:30your coding information was very helpful for me o ...your coding information was very helpful for me o better knowledge in that<a href="https://intellimindz.com/python-course-in-chennai/" rel="nofollow">python course in chennai</a>|<a href="https://chennaitraining.in/python-training-in-chennai/" rel="nofollow">python training in chennai</a>|<a href="https://intellimindz.com/informatica-data-quality-training-in-chennai/" rel="nofollow">informatica data quality training in chennai</a>|<a href="https://intellimindz.com/java-training-in-chennai/" rel="nofollow">java training in chennai</a>|<a href="https://intellimindz.com/salesforce-training-in-chennai/" rel="nofollow">salesforce training in chennai</a>alexhttps://www.blogger.com/profile/13387254110802020207noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-51096578554432233422022-07-12T15:11:18.406+05:302022-07-12T15:11:18.406+05:30hello bro your comment was very helpful for me to ...hello bro your comment was very helpful for me to understand in apex code using Rest Api<a href="https://intellimindz.com/hadoop-training-in-chennai/" rel="nofollow">hadoop training in chennai</a>|<a href="https://intellimindz.com/web-designing-course-in-chennai/" rel="nofollow">web designing course in chennai</a>|<a href="https://intellimindz.com/php-training-in-chennai/" rel="nofollow">php training in chennai</a>|<a href="https://intellimindz.com/iot-training-in-chennai/" rel="nofollow">iot training in chennai</a>|<a href="https://intellimindz.com/react-training-in-chennai/" rel="nofollow">react training in chennai</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-10911965303409084492022-01-05T09:49:51.320+05:302022-01-05T09:49:51.320+05:30Really excellent content. Very easy,clear and deta...Really excellent content. Very easy,clear and detailed explanation. Parinoreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-65941213037251346942020-11-22T23:59:38.882+05:302020-11-22T23:59:38.882+05:30I am getting the Postman error as "Apex REST ...I am getting the Postman error as "Apex REST does not support multipart/form-data requests" after clicking "Send" button. Can you please helpAnandhttps://www.blogger.com/profile/10441688138371217836noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-72576991871089749342020-06-23T19:28:10.455+05:302020-06-23T19:28:10.455+05:30Hi Amit,
I have the same situation but I won'...Hi Amit,<br /><br />I have the same situation but I won't want to setup an App as my requirement is little bit different <br /><br />I am able to setup the oauth in postman using client Id and Client secret (These values were provided by the other team I am accessing the API for)<br /><br />I have to write a apex class to hit the API and then create a post request using the (Logic )<br /><br />I am stuck at how to generate a oauth2.0 TOKEN in the apex class. Could you please help here.<br /><br /><br />Below is what I am trying to do.<br /><br />global class GD_Wootric_APIauthentication {<br /><br /> public String GenerateAuthToken() {<br /> <br /> //Modify these variables<br /> String grant_type = 'client_credentials';<br /> String scope = 'api-full-access';<br /> String client_id ='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';<br /> String client_secret = 'XXXXXXXXXXXXXXXXXXXXX';<br /> String username = 'mayank@gmail.com.gdprod.stage';<br /> String password = 'abc@164';<br /> String AccessToken = '';<br /> <br /> String AccessTokenUrl = 'https://api.wootric.com/oauth/token';<br /> <br /> <br /> HttpRequest req = new HttpRequest();<br /> req.setMethod('POST');<br /> req.setHeader('Authorization', 'Basic ' + EncodingUtil.base64Encode(Blob.valueOf(client_id + ':' + client_secret)));<br /> req.setHeader('Host','https://login.salesforce.com/oauth'); <br /> req.setHeader('content-type', 'application/x-www-form-urlencoded'); <br /> req.setEndpoint('https://api.wootric.com/oauth/token'); <br /> req.setBody('grant_type=client_credentials');<br /> <br /> <br /> Http binding = new Http();<br /> System.debug('Before Sending the Request'+ req);<br /> HttpResponse res = binding.send(req);<br /> System.debug('Response Recieved '+ res);<br /> <br /> if(res.getStatusCode() == 200) {<br /> JSONParser parser = JSON.createParser(res.getBody());<br /> while(parser.nextToken() != null) {<br /> if((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'access_token')) {<br /> <br /> parser.nextToken();<br /> AccessToken = parser.getText();<br /> System.debug('The Access Token for Authorization '+ AccessToken);<br /> }<br /> }<br /> }else {<br /> System.debug('Request not Successfull '+ res.getStatusCode());<br /> return null;<br /> }<br /> System.debug('Access Token is '+ AccessToken);<br /> return accessToken;<br /> <br /> }<br />}Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-50786221517713355462020-05-06T22:21:36.586+05:302020-05-06T22:21:36.586+05:30wow! cool this saved some hours, thank god I read ...wow! cool this saved some hours, thank god I read the comments before spending a lot of time.<br /><br />so base url may differ for your login. Basically it the one displayed in the URL bar when you are on the dashboard. So guys make sure it is not hardcoded to -na50.salesforce.com<br /><br />Thank you!magentahttps://www.blogger.com/profile/16922259949680007626noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-40411555206754510742020-04-19T20:56:07.282+05:302020-04-19T20:56:07.282+05:30Why does the generate token asks for username and ...Why does the generate token asks for username and password to login first and then it generates the token?<br />What is the point of accessing web service using user interaction involved in it?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-87646406799126244082020-03-09T21:33:51.377+05:302020-03-09T21:33:51.377+05:30As per Salesforce manual, we can expose an apex an...As per Salesforce manual, we can expose an apex an class as REST webservice, but it does not list @HttpOptions annotation -<br />https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_annotations_list.htm<br /><br />By any chance, could you provide sample code implementing/exposing OPTIONS http method as webservice.anupamhttps://www.blogger.com/profile/12100151848900644798noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-13590321620591435232020-02-06T01:03:54.628+05:302020-02-06T01:03:54.628+05:30Hi Amit,
I have used "https://iam-cool-dev-...Hi Amit, <br /><br />I have used "https://iam-cool-dev-ed.lightning.force.com/services/apexrest/api/Account/CD656092".<br />I am getting errorCode": "INVALID_SESSION_ID".<br />Can you suggest?<br />Anonymoushttps://www.blogger.com/profile/04256703137975269767noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-46694225097231586612019-11-26T16:38:58.030+05:302019-11-26T16:38:58.030+05:30Hi Amit, I was able to resolve my Issues with the ...Hi Amit, I was able to resolve my Issues with the help of your article.Neet Classes In Mumbaihttps://neetcoachingmumbai.com/noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-63923507270301653362019-11-13T12:45:47.565+05:302019-11-13T12:45:47.565+05:30I followed step-by-step your method in this video ...<br /> I followed step-by-step your method in this video , I got the security token correctly, but when sending the GET request I keep having in return "message": "Session expired or invalid", "errorCode": "INVALID_SESSION_ID" MANEESH P Mhttps://www.blogger.com/profile/02814427665536760531noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-65730985357591281782019-09-18T03:21:40.396+05:302019-09-18T03:21:40.396+05:30Sorry, my mistake, the salesforce_instance url wor...Sorry, my mistake, the salesforce_instance url works. I didn't put token in the request header. And there is no need to create site.Anonymoushttps://www.blogger.com/profile/04578866203379555214noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-55581453145357414092019-09-18T02:56:39.986+05:302019-09-18T02:56:39.986+05:30Can you show me how you create amitblog-dev-ed.my....Can you show me how you create amitblog-dev-ed.my.salesforce.com? Anonymoushttps://www.blogger.com/profile/04578866203379555214noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-70385417029203642322019-09-18T02:54:46.150+05:302019-09-18T02:54:46.150+05:30Hi Amit,
Thanks for sharing the information.
In th...Hi Amit,<br />Thanks for sharing the information.<br />In the video, I saw you use amitblog-dev-ed.my.salesforce.com/apexrest/api/ instead of https://na50.salesforce.com/services/apexrest/api/Account/12345. For me, the salesforce_instancename one didn't work. And I suppose you define amitblog-dev-ed in the setup->Site, right? After I create the site, when I make request, it will return "You do not have access to the Apex class named". When I add apex access for the site, then the amitblog-dev-ed.my.salesforce.com/apexrest/api/ can be accessed by anyone. I am wondering I didn't setup the site correctly?<br /> Anonymoushttps://www.blogger.com/profile/04578866203379555214noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-38835032989084844082019-09-12T18:38:27.806+05:302019-09-12T18:38:27.806+05:30Hi Amit,
Thanks for sharing the instructions. I h...Hi Amit, <br />Thanks for sharing the instructions. I have created a connected app and followed your instructions but I am getting invalid_grant error while making a post call to generate token in Postman. How to resolve? Anonymoushttps://www.blogger.com/profile/05161821770414528551noreply@blogger.comtag:blogger.com,1999:blog-4216096443336193383.post-82311231400673655382019-07-22T15:28:17.801+05:302019-07-22T15:28:17.801+05:30Great! Awesome post, tried it worked as expected!
...Great! Awesome post, tried it worked as expected!<br />@Amit Keep-Going.Rakesh Gaikwadnoreply@blogger.com