You need to sign in to do that
Don't have an account?

Using API's without authentication
Hi there :)
i'm currently working on an native Android app for my company and ran into some problems with Salesforce lately.
I hope i can find some help here.
What i want to achieve:
The company has a lot of Accounts in Salesforce with 3 important fields for the app: Name, Business (Workshop or Parts Dealer) and location(latitude, longitude)
I would like to show those Accounts(Workshops/Parts Dealers) as markers on a google map in my Android app based on a radius around the user's current location. So it would be more than sufficient to get the data as JSON or XML(i read about sObjects, which would be nice too)
The app will be freely available on Google Play Store and every user should be able to see all the Workshops/Parts dealers around the world.
The problem i'm facing is that i can't find a way to fetch the data inside my app without authenticating every user with a Salesforce-Login.
Which API is the best to use in this case?
It would be so awsome if anybody could help me with this problem.
What i tried so far:
- SalesforceMobileSDK: If i extend SalesForceApplication i always end up with the Salesforce-Login Screen.
It seems that every client has to be authenticated for API-calls to work. I tried using the method "peekUnauthenticatedRestClient", but this method only works on full path URL's(e.g. "https://api.spotify.com/v1/search?q=James%20Brown&type=artist"), which isn't really practically for my Use-case.
- I feel like i read nearly all docs about salesforce api, but can't quite get my head around how to solve this problem, although it seems like to be a pretty common use-case.
- would a salesforce-apex method which would select all records inside a set radius around the user's location be accessable without authentication?
Thanks for your help in advance!
Roman
i'm currently working on an native Android app for my company and ran into some problems with Salesforce lately.
I hope i can find some help here.
What i want to achieve:
The company has a lot of Accounts in Salesforce with 3 important fields for the app: Name, Business (Workshop or Parts Dealer) and location(latitude, longitude)
I would like to show those Accounts(Workshops/Parts Dealers) as markers on a google map in my Android app based on a radius around the user's current location. So it would be more than sufficient to get the data as JSON or XML(i read about sObjects, which would be nice too)
The app will be freely available on Google Play Store and every user should be able to see all the Workshops/Parts dealers around the world.
The problem i'm facing is that i can't find a way to fetch the data inside my app without authenticating every user with a Salesforce-Login.
Which API is the best to use in this case?
It would be so awsome if anybody could help me with this problem.
What i tried so far:
- SalesforceMobileSDK: If i extend SalesForceApplication i always end up with the Salesforce-Login Screen.
It seems that every client has to be authenticated for API-calls to work. I tried using the method "peekUnauthenticatedRestClient", but this method only works on full path URL's(e.g. "https://api.spotify.com/v1/search?q=James%20Brown&type=artist"), which isn't really practically for my Use-case.
- I feel like i read nearly all docs about salesforce api, but can't quite get my head around how to solve this problem, although it seems like to be a pretty common use-case.
- would a salesforce-apex method which would select all records inside a set radius around the user's location be accessable without authentication?
Thanks for your help in advance!
Roman
1) Write a Restservice to expose your data.
2) Create a Community and provide access to apex class and account object to the Guest user profile.
Samplecommunity url -> https://somedomain.cs16.force.com/communityname
3) Go to workbench and test your API using rest explorer
relative url -> /services/apexrest/Account
4) Your public url will now be https://somedomain.cs16.force.com/communityname/services/apexrest/Account
Mark as Best Answer if it helps.
Thanks,
Santosh
That was exactly what i needed!
Medzcure - The Online Medicine Store the world trusts! Yes, when it comes to buying all kinds of Generic medicines and healthcare products, people from every corner of the world put their trust and faith in us. It is accessible 24/7 and provides the fastest delivery. If you suffer from ED and Smart Pills you will get the Cheapest price as well as Free shipping from our site Medzcure.
Pain is a common symptom that can affect anyone, regardless of age or gender. It can be caused by a variety of factors, such as injuries, chronic conditions, or psychological issues. Understanding pain and its underlying causes can help you manage it effectively and improve your quality of life. In this blog post, we'll discuss the different types of pain, their causes, and available treatment options.
Visit Our Store: www.medzcure.com
However, taking too much acetaminophen might harm the liver and have negative consequences. Among the narcotic analgesics is hydrocodone. Withdrawing from hydrocodone (https://usablinkhealthstore.com/product-category/buy-hydrocodone-online/)is a medical emergency that has to be managed
VISit US:-https://usablinkhealthstore.com
Genericpharmas is a great alternative to get medicines with just a few clicks. It is an international-based online drugstore that offers excellent-quality medications. Its main goal is to supply medications at an affordable price to the local drugstore. Undoubtedly, this online drugstore works round the clock to offer such medicines; it is a great choice to buy medicine for sexual healthcare without leaving your medicines.
Besides treating over-the-top sleepiness, Artvigil 150 has many off-name utilizations, and experts across the world suggest it for the treatment of conditions, such as model, oppressive, steady exhaustion problems, Consideration Shortage Hyperactivity Issues, and A lack of ability to concentrate consistently Confusion.
For more information Visit at Genericpharmas.comTerubuk adalah sejenis tanaman hijau yang termasuk dalam keluarga basella. Tanaman ini tumbuh merambat seperti anggur dan biasanya ditemukan di daerah tropis. Hidup Sehat (https://hidupsehaat.tumblr.com/) Sayur terubuk memiliki daun hijau gelap yang tebal dan berbentuk jantung. Rasanya yang renyah dan sedikit asam membuatnya menjadi tambahan yang menyegarkan dalam hidangan. Selain itu, terubuk juga memiliki varietas bunga tebu yang indah, yang sering digunakan sebagai hiasan dalam masakan.
tiny fishing (https://tiny-fishing.com)
tiny fishing(dash cam china (http://www.yuweitek.com/en))
Buy rdp (https://planetrdp.com/)
Thanks salesforce team, i faced the same issue too but when i modified the code as said on the top , it got fixed for account.
Site: freetricksworld.com