• Santiago Taco
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
I am developing an application that get some information from Salesforce. I have used "Web Server OAuth Authentication Flow" and it is working now. My question is about consumer key and secrete ket because I need these for call the authenticazion endpoint.

https://login.salesforce.com/services/oauth2/authorize?response_type=code
&client_id=3MVG9lKcPoNINVBIPJjdw1J9LLM82HnFVVX19KY1uA5mu0QqEWhqKpoW3svG3X
HrXDiCQjK1mdgAvhCscA9GE&redirect_uri=https%3A%2F%2Fwww.mysite.com%2F
code_callback.jsp&state=mystate

I would like to know if is possible getting the same consumer key and secrete key for all users that use my app?. Something similar to client id in Google because it is the same independent of the user. 
Good Afternoon everyone,

I want to use Web Server OAuth Authentication Flow, I have done all this steps:
1. crete this URl to get de code id:
https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9CEn_O3jvv0xJWqiGa511111rwY4GvEFzR44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&scope=refresh_token&redirect_uri=https://mail.google.com/mail/u/1/#inbox&display=popup

2. the code received was: 
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&code=aPrxPGj_8oB..iSmfoLZNHA50FFOit.PhfWwb_qJDfvIuXFYdePtZcyHDgqJJzwHIt8gxtlcFg%3D%3D&client_id=3MVG9CEn_O3jvv0xJWqiGa5BdlH1111GvEFzR44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=30282611111123314693&redirect_uri=https://mail.google.com/mail/u/1/#inbox

3. Create this post url:
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&code=aPrxPGj_8oB..iSmfoLZNHA50FFOit.PhfWwb_qJDfvIuXFYdePtZcyHDgqJJzwHIt8gxtlcFg%3D%3D&client_id=3MVG9CEn_O3jvv0xJWqiGa5BdlHKrwY4GvEFzR44rfMsyb11111AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=3028261111123314693&redirect_uri=https://mail.google.com/mail/u/1/#inbox

4. I got this Json request:
{
    "access_token": "00D6A000000v0i1!ARYAQLDVBzNOhAl3SjEkNbN5zXMsF6iQQPOqcVNXs_FIf_Qrjm2Ez42Lr6fQn5EnfPYWmNKewHwAToq0D.6apcnXUyFudTqF",
    "refresh_token": "5Aep861w1PjQhFtnoCbFAb.Tb5OnHJATNq8AGpuzXOLx5VicJ3RmIKYO.MhC9HVgKCP02qo3QHd3AF5jKjq8JgV",
    "signature": "ofNXb7vhw1uMmJ6eOJENeDaytzu/Hf/gmTq3z7FB0C8=",
    "scope": "refresh_token",
    "instance_url": "https://ioetexamples-dev-ed.my.salesforce.com",
    "id": "https://login.salesforce.com/id/00D6A000000v0i1UAA/0056A000000VKGVQA4",
    "token_type": "Bearer",
    "issued_at": "1524418764934"
}
5. I tryied to use this Get method to obtain a List of Available Objects:
https://ioetexamples-dev-ed.my.salesforce.com/services/data/v20.0/sobjects/ -H "Authorization: Bearer 00D6A000000v0i1!ARYAQLDVBzNOhAl3SjEkNbN5zXMsF6iQQPOqcVNXs_FIf_Qrjm2Ez42Lr6fQn5EnfPYWmNKewHwAToq0D.6apcnXUyFudTqF" -H "X-PrettyPrint:1"

After that I got this message:

{
        "message": "Session expired or invalid",
        "errorCode": "INVALID_SESSION_ID"
    }
What could be wrong?
Hi everybody,
I am trying to use Rest API, I want to use the method User-Agent OAuth Authentication Flow. 
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_user_agent_oauth_flow.htm

But when I use this URI: 

https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=3MVG9CEn_O3jvv..................................v8c20JARGLpzU8n8BB&redirect_uri=https%3A%2F%2Fmail%2Egoogle%2Ecom%2Fmail%2Fu%2F1%23inbox&state=mystate

I get this error message:

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

Also I created a connected app and my Callback URL is:

https://mail.google.com/mail/u/1/#inbox

If I use this method Username-Password OAuth Authentication Flow:

https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id=3MVG9CEn_O3jvv0xJWqiG...........R44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=302826.......3314693&username=sto%40.com&password=svsdvvsdvvxvxcQsfsfsfszbbbhrxtxmQXtjbZoBsmMh6sYKMv

I could get the token and it is working.

Could someone help with this error?

 
Good Afternoon everyone,

I want to use Web Server OAuth Authentication Flow, I have done all this steps:
1. crete this URl to get de code id:
https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9CEn_O3jvv0xJWqiGa511111rwY4GvEFzR44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&scope=refresh_token&redirect_uri=https://mail.google.com/mail/u/1/#inbox&display=popup

2. the code received was: 
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&code=aPrxPGj_8oB..iSmfoLZNHA50FFOit.PhfWwb_qJDfvIuXFYdePtZcyHDgqJJzwHIt8gxtlcFg%3D%3D&client_id=3MVG9CEn_O3jvv0xJWqiGa5BdlH1111GvEFzR44rfMsyb1vuI4AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=30282611111123314693&redirect_uri=https://mail.google.com/mail/u/1/#inbox

3. Create this post url:
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&code=aPrxPGj_8oB..iSmfoLZNHA50FFOit.PhfWwb_qJDfvIuXFYdePtZcyHDgqJJzwHIt8gxtlcFg%3D%3D&client_id=3MVG9CEn_O3jvv0xJWqiGa5BdlHKrwY4GvEFzR44rfMsyb11111AE32pdEtN2pybLJDv8c20JARGLpzU8n8BB&client_secret=3028261111123314693&redirect_uri=https://mail.google.com/mail/u/1/#inbox

4. I got this Json request:
{
    "access_token": "00D6A000000v0i1!ARYAQLDVBzNOhAl3SjEkNbN5zXMsF6iQQPOqcVNXs_FIf_Qrjm2Ez42Lr6fQn5EnfPYWmNKewHwAToq0D.6apcnXUyFudTqF",
    "refresh_token": "5Aep861w1PjQhFtnoCbFAb.Tb5OnHJATNq8AGpuzXOLx5VicJ3RmIKYO.MhC9HVgKCP02qo3QHd3AF5jKjq8JgV",
    "signature": "ofNXb7vhw1uMmJ6eOJENeDaytzu/Hf/gmTq3z7FB0C8=",
    "scope": "refresh_token",
    "instance_url": "https://ioetexamples-dev-ed.my.salesforce.com",
    "id": "https://login.salesforce.com/id/00D6A000000v0i1UAA/0056A000000VKGVQA4",
    "token_type": "Bearer",
    "issued_at": "1524418764934"
}
5. I tryied to use this Get method to obtain a List of Available Objects:
https://ioetexamples-dev-ed.my.salesforce.com/services/data/v20.0/sobjects/ -H "Authorization: Bearer 00D6A000000v0i1!ARYAQLDVBzNOhAl3SjEkNbN5zXMsF6iQQPOqcVNXs_FIf_Qrjm2Ez42Lr6fQn5EnfPYWmNKewHwAToq0D.6apcnXUyFudTqF" -H "X-PrettyPrint:1"

After that I got this message:

{
        "message": "Session expired or invalid",
        "errorCode": "INVALID_SESSION_ID"
    }
What could be wrong?