Hi @codewit_Khan, Before requesting the access token, I'd like to mention an important setting in Salesforce Setup under "OAuth and OpenID Connect Settings". I enabled the following two options: 1.Allow OAuth Username-Password Flows 2.Allow Authorization Code and Credentials Flows Enabling these options resolves the issue: "Error: unsupported_grant_type ,Description: grant type not supported." Thanks for the insightful video
Hey thanks bro for putting this info. I have pinned your comment so that others get to know about it and I will not have to individually reply to anyone facing the issue! Please subscribe the channel if not done already!
This is a really useful video to understand setting up a Connected App and using Post to perform API calls into Salesforce. I had the issue where I was getting the error "Session_Id is expired". To resolve this I went to the Post settings and enabled 'Follow Authorization header', which then allowed me to insert an Account record.
Hi Guys, If anyone's facing following error 'Error: invalid_grant, Description: authentication failure'. Fix : Setting => OAuth and OpenID Connect Settings => Turn On the '**Allow OAuth Username-Password Flows**' Thanks
short, simple and on point!! out of many youtube vids on the topic, this one really helped me. Thanks! can you please make a video on How to login in postman again after session has expired? using the same existing token??
Hey buddy! sure I was thinking to make a video on the same topic that is to login again if the session has expired basically we generate a new access token every time the session gets expired for which there is an endpoint we need to hit. Thanks
Please make sure you have appended security token with password without separated by any special characters. Please subscribe the channel if not done already.
Hi, I was Generated Access token. I'm trying to post the request to create Sales Order but I'm getting Error, Session expired. I want to create Sales Order using RestApi With JSON. Can explain more about this.
After adding all these details in postman and trying to generate new access token but getting this error : Error: invalid_grant, Description: authentication failure What could be the reason behind this?
Hi, make sure you suffix the security token with the password without any special characters in between them. In the password section its the combination of actual password and security token that we have to enter for authentication.
Thanks , That's a good way , but i want to ask one thing here based on real life project scenario that is , security token get reset whenever the password expires or its changed. then the external application which is consuming security token will also have to make changes. Please share what is the solution for such scenario.
Hi, Security Tokens are not required from Trusted IP addresses. You can make a single range of IP address 'trusted' in Setup > Security Controls > Network Access, also you can whitelist multiple ranges like 0.0.0.0 to 255.255.255.255 on a Profile too.
Please make a video on How to create JSON (eg. {"inboundEvent":"STModel","inboundRequest":"Test"}) to test POST request with complex structure. Thanks!
cannot find "reset my security token" in SF, with "my settings", is that the same thing as "Initial Access Token for Dynamic Client Registration" in app manager?
Hi, if your Profile/Permission set has Login IP Ranges defined then you wont be able to view Reset Security Token option. However if you have IP ranges defined then you dont need to append security token along with password for authentication only password will suffice! For your reference: help.salesforce.com/s/articleView?id=000386179&language=en_US&type=1#:~:text=Profile%20is%20Corrupted-,IP%20Restrictions%20in%20the%20Login%20IP%20Ranges,option%20will%20not%20be%20available.&text=In%20order%20for%20the%20Reset,have%20Login%20IP%20Ranges%20listed.
I followed the same steps which you mentioned but i am getting this error: [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}] Can you please help to solve this
Hi, I hope you are entering password and security token altogether without any space or character in the password section. Suppose password is "abc" and token is "xyz" then password should be "abcxyz". The error comes only due to this reason and also make sure you have provided correct Client Id and Client secret.
@@codewith_Khan Yes indeed i am. I have been a developer for 23 years. This is my first time with Salesforce though. What about IP restrictions - can this make a difference?
@@codewith_Khan The problem was that in "oAuth and OpenID Connect Settings" the default setting for "Allow OAuth Username-Password Flows" was set to off
Actually creation of connected app option under App manager in lightning view as well so not sure if this just got added to lightening view after you posted this video or was always there.
Hi, you are right when I created the video it was not available in lightning at that time however now you can access/create connected apps in lightning experience as well. Thank you
Hi make sure you are entering the correct end point Salesforce URL with proper formatting as these are standard API urls. If still you are facing the issue kindly share the URL you are trying to hit. Also, please subscribe the channel if not done already.
@@codewith_Khan Hi , yes, im using the correct URL, just like in your video but with my org. I made a request with workbench and work fine, but not with postman.
@codewith_Khan I tried many times but unfortunately I have always same error "Error: invalid_client_id, Description: client identifier invalid". Any suggestion?
Hi, please make sure that after filling all the details kindly use the access token which is generated after successful authentication. Please watch this part of the video 10:30
Hi Khan! Thank you for this! I have one question I keep getting the "Session_Id is expired" message and having to reset the token. What do I do so the token doesn't expire? Thanks again!
Hi friend! Unfortunately we have to generate session Id after every interval of time just like we have to login to our Salesforce org every time with username and password if we have been logged off due to inactivity. However there is a process of automating this session Id generation for which I might have to prepare another video. Thanks for bringing this out. Please subscribe the channel if not done already.
@@dannydiaz4782 thanks for the follow up, recently I uploaded a new video on refreshing the access token automatically with a single click. Please find the link to the video below however there is still no way to auto refresh the access token. th-cam.com/video/IZX9Nlo6pYk/w-d-xo.html
Thanks for the video. I followed the video thoroughly. But I am getting the below error: "Error: invalid_grant, Description: authentication failure" My password is correct I am sure of that and so is the security token.
Hi, I hope you are entering password and security token altogether without any space or character. Suppose password is "abc" and token is "xyz" then password should be "abcxyz". The error comes only due to this reason and also make sure you have provided correct Client Id and Client secret.
@@AashishBhatt-hp6ml Try to enable the username-password flow, in OAuth and OpenID Connect Settings, select Allow OAuth Username-Password Flows. It's disabled by default
Hi, please make sure you are framing the endpoint URL correctly. In order to discuss over a screen share session kindly reach out to me in case you are still facing the issue. shahbaz.3331khan@gmail.com Please subscribe the channel if not done already!!
Hi, make sure you using the correct endpoint since 404 error usually comes when we are making callout to the endpoint which does not exist. Please frame your endpoint appropriately. It should be in the below format: {{domain}}/action
Then you can simply call the Salesforce standard POST API call for account creation. Refer to below article for reference: developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
Hi friend, I am glad that it was helpful. Please subscribe the channel if not done already. And here is another video on Postman Integration with Salesforce(automate session Id generation) th-cam.com/video/IZX9Nlo6pYk/w-d-xo.html Thanks
Hi @codewit_Khan,
Before requesting the access token, I'd like to mention an important setting in Salesforce Setup under "OAuth and OpenID Connect Settings". I enabled the following two options:
1.Allow OAuth Username-Password Flows
2.Allow Authorization Code and Credentials Flows
Enabling these options resolves the issue: "Error: unsupported_grant_type ,Description: grant type not supported."
Thanks for the insightful video
Thanks for saving the day🤩
🥰🥰🥰🥰
Hey thanks bro for putting this info. I have pinned your comment so that others get to know about it and I will not have to individually reply to anyone facing the issue!
Please subscribe the channel if not done already!
@@codewith_Khan Thanks for your support by uploading videos.Your insights means alot
thankyou very much for saving my time
This is the simplest and best video I've seen on how to set up and start using Postman with Salesforce. Thanks so much!
Always happy to help!!!
Please subscribe the channel if not done already.
This is a really useful video to understand setting up a Connected App and using Post to perform API calls into Salesforce. I had the issue where I was getting the error "Session_Id is expired". To resolve this I went to the Post settings and enabled 'Follow Authorization header', which then allowed me to insert an Account record.
Glad it was helpful! Please subscribe the channel if not done already!
This is high quality presentation tutorial, very clear and detailed. Thank you very much 😊👍
You are welcome. I am glad it was helpful!! Please subscribe the channel if not done already!! Thanks
You have a great way of explaining complex things in simple terms my friend!
Thank you friend!! Glad it was helpful
Hi Guys, If anyone's facing following error 'Error: invalid_grant, Description: authentication failure'.
Fix :
Setting => OAuth and OpenID Connect Settings => Turn On the '**Allow OAuth Username-Password Flows**'
Thanks
Thank you that was helpful
Thanks a lot dude!
Hi shahbaz , Thanks for the excellent demo.
You're welcome!
Please subscribe the channel if not done already!
short, simple and on point!! out of many youtube vids on the topic, this one really helped me.
Thanks!
can you please make a video on How to login in postman again after session has expired? using the same existing token??
Hey buddy! sure I was thinking to make a video on the same topic that is to login again if the session has expired basically we generate a new access token every time the session gets expired for which there is an endpoint we need to hit. Thanks
Error: unsupported_grant_type, Description: grant type not supported
Please make sure you have appended security token with password without separated by any special characters
@@codewith_Khan I have but it still doesn't work
I'm encountering an error: "Error: invalid_grant. Description: authentication failure." As a result, I'm unable to obtain an access token.
Please make sure you have appended security token with password without separated by any special characters.
Please subscribe the channel if not done already.
im also getting this error. my password is "" no spaces. where is it in the salesforce doc to do this?
@@Jliuify how did you resolve?
Hi,
superb explanation.
thanks for your video and please keep going like this.
Always happy to help!!!
Please subscribe the channel if not done already.
Hi, I was Generated Access token. I'm trying to post the request to create Sales Order but I'm getting Error, Session expired. I want to create Sales Order using RestApi With JSON. Can explain more about this.
After adding all these details in postman and trying to generate new access token but getting this error :
Error: invalid_grant, Description: authentication failure
What could be the reason behind this?
facing same issue and stuck:|, were you able to resolve it
Hi, make sure you suffix the security token with the password without any special characters in between them. In the password section its the combination of actual password and security token that we have to enter for authentication.
Did you resolved?
I am also facing the same issue
@@codewith_KhanI double checked it facing the same error again
@@codewith_Khan after doing same im getting same error
Thanks , That's a good way , but i want to ask one thing here based on real life project scenario that is , security token get reset whenever the password expires or its changed. then the external application which is consuming security token will also have to make changes. Please share what is the solution for such scenario.
Hi, Security Tokens are not required from Trusted IP addresses. You can make a single range of IP address 'trusted' in Setup > Security Controls > Network Access, also you can whitelist multiple ranges like 0.0.0.0 to 255.255.255.255 on a Profile too.
Are you a god? Bro, thanks it was very helpful
Hey bro glad it helped!! Please subscribe the channel if not done already.
Error: Could not complete OAuth 2.0 token request
Have you got up the idea to resolve this
can you please explain how to get Access token from org?
Please make a video on How to create JSON (eg. {"inboundEvent":"STModel","inboundRequest":"Test"}) to test POST request with complex structure. Thanks!
Great suggestion!
cannot find "reset my security token" in SF, with "my settings", is that the same thing as "Initial Access Token for Dynamic Client Registration" in app manager?
Hi, if your Profile/Permission set has Login IP Ranges defined then you wont be able to view Reset Security Token option. However if you have IP ranges defined then you dont need to append security token along with password for authentication only password will suffice!
For your reference:
help.salesforce.com/s/articleView?id=000386179&language=en_US&type=1#:~:text=Profile%20is%20Corrupted-,IP%20Restrictions%20in%20the%20Login%20IP%20Ranges,option%20will%20not%20be%20available.&text=In%20order%20for%20the%20Reset,have%20Login%20IP%20Ranges%20listed.
I followed the same steps which you mentioned but i am getting this error: [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
Can you please help to solve this
Hi! you will have to save your collection first and make sure you run the collection atleast once before making any api requests to salesforce.
Getting below error msg
"message": "Session expired or invalid",
"errorCode": "INVALID_SESSION_ID"
Hi, please make sure you Generate the access token and use it every time session is expired. Please watch this part of the video 10:30
hey have you found the solution? i am also facing same problem?
olá eu também estou com o mesmo problema :c , mesmo gerando um novo token@@Shri0900
Even im getting Same error, even after Generating the access token and using it again and again, also reset my security token as well
But i get "Error: invalid_grant, Description: authentication failure" when i try to Get the token ...
Hi, I hope you are entering password and security token altogether without any space or character in the password section. Suppose password is "abc" and token is "xyz" then password should be "abcxyz". The error comes only due to this reason and also make sure you have provided correct Client Id and Client secret.
@@codewith_Khan Yes indeed i am. I have been a developer for 23 years. This is my first time with Salesforce though. What about IP restrictions - can this make a difference?
@@codewith_Khan Also i am using developer account
@@codewith_Khan On another Salesforce account i have successfully setup OpenID login for an Umbraco Website
@@codewith_Khan The problem was that in "oAuth and OpenID Connect Settings" the default setting for "Allow OAuth Username-Password Flows" was set to off
Actually creation of connected app option under App manager in lightning view as well so not sure if this just got added to lightening view after you posted this video or was always there.
Hi, you are right when I created the video it was not available in lightning at that time however now you can access/create connected apps in lightning experience as well. Thank you
Hi! I have this error: "The requested resource does not exist" when sending the JSON.
Hi make sure you are entering the correct end point Salesforce URL with proper formatting as these are standard API urls. If still you are facing the issue kindly share the URL you are trying to hit.
Also, please subscribe the channel if not done already.
@@codewith_Khan Hi , yes, im using the correct URL, just like in your video but with my org. I made a request with workbench and work fine, but not with postman.
@codewith_Khan I tried many times but unfortunately I have always same error "Error: invalid_client_id, Description: client identifier invalid". Any suggestion?
Hi! Apology for the delay as I have been busy for a while. Let me know if you are still facing the issue and we will arrange a time to connect!!
@@codewith_Khan yes have same issue
How find the url connect with Postman from SF and the password not understand?
End point successfully authenticated but when trying to "GET" , error is session expired or Invalid.
Hi, please make sure that after filling all the details kindly use the access token which is generated after successful authentication. Please watch this part of the video 10:30
How we can integrate netsuite and salesforce using netsuite restlet script?
I followed the video and getting authentication failed. Can you please help.
Hey friend! Make sure you append the security token with the password correctly there should not be any separator between them.
How can we authenticate community portal user from rest resorce/api
I m able to do admin rest service but any sugettions on portal side
How to get access token without username and password? Please help
Error : client credentials not enabled
Hi, please read the pinned comment you will get the resolution!
Please subscribe the channel if not done already!
Hi Khan! Thank you for this! I have one question I keep getting the "Session_Id is expired" message and having to reset the token. What do I do so the token doesn't expire? Thanks again!
Hi friend! Unfortunately we have to generate session Id after every interval of time just like we have to login to our Salesforce org every time with username and password if we have been logged off due to inactivity. However there is a process of automating this session Id generation for which I might have to prepare another video. Thanks for bringing this out.
Please subscribe the channel if not done already.
@@codewith_Khan do you happen to have any resource that assist me with this? I can't seem to get a refreshed token to the 3rd party. Thanks!
@@dannydiaz4782 thanks for the follow up, recently I uploaded a new video on refreshing the access token automatically with a single click. Please find the link to the video below however there is still no way to auto refresh the access token.
th-cam.com/video/IZX9Nlo6pYk/w-d-xo.html
Thanks for the video. I followed the video thoroughly. But I am getting the below error:
"Error: invalid_grant, Description: authentication failure"
My password is correct I am sure of that and so is the security token.
Hi, I hope you are entering password and security token altogether without any space or character. Suppose password is "abc" and token is "xyz" then password should be "abcxyz". The error comes only due to this reason and also make sure you have provided correct Client Id and Client secret.
Getting same error did you find the solution
Try to enable the username-password flow, in OAuth and OpenID Connect Settings, select Allow OAuth Username-Password Flows. It's disabled by default
@@AashishBhatt-hp6ml Try to enable the username-password flow, in OAuth and OpenID Connect Settings, select Allow OAuth Username-Password Flows. It's disabled by default
i do that but still get same error
@@elenasokolova9483
getting error "Error: scope parameter not supported". Could you please help with this
Hi, please make sure you are framing the endpoint URL correctly. In order to discuss over a screen share session kindly reach out to me in case you are still facing the issue.
shahbaz.3331khan@gmail.com
Please subscribe the channel if not done already!!
Hey, I can see Connected App create option in lightning too. Isn't the same?
Good catch bro, that is correct however it has been made available in recent upgrade. Both ways are same basically.
Great video, helped a lot.
Glad it helped
Please subscribe the channel if not done already.
Best one Good to know
Glad it helped!! Please subscribe the channel if not done already!
Thanks for the explaination
Glat it was helpful! Please subscribe the channel if not done already!!
hii,
I'm facing with the error 404 not found. Could anyone please suggest
Hi, make sure you using the correct endpoint since 404 error usually comes when we are making callout to the endpoint which does not exist. Please frame your endpoint appropriately. It should be in the below format:
{{domain}}/action
Very helpful! Thank you very much!!!
Glad that it was helpful. Please subscribe the channel if not done already.
if i have to update a account, how can i do it?
Then you can simply call the Salesforce standard POST API call for account creation.
Refer to below article for reference:
developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
For more clarification and queries connect with me on Topmate
topmate.io/shahbaz_khan16
What the hell?!? This fixed it for me. OMG. I was scratching my head for so long
Hi friend, I am glad that it was helpful. Please subscribe the channel if not done already.
And here is another video on Postman Integration with Salesforce(automate session Id generation)
th-cam.com/video/IZX9Nlo6pYk/w-d-xo.html
Thanks
I am getting "unsupported_grant_type"