I have an android messaging app and I save all data to firebase realtime db. I want to get user data on c#.
First, I try to send GET method on POSTMAN with this url https://MY_PROJECT_ID.firebaseio.com/users/USER_ID
and returned data is :
I just want to get some JSON that includes my user's data. How to do it ?
You can click on the HTML button and change it to JSON.
just append .json at the end like this:
https://MY_PROJECT_ID.firebaseio.com/users/**USER_ID.json**
Related
Does anyone know how to receive data in a POST response sent after making a POST request to Firebase's real-time database? I've gone through its REST API but I couldn't get nothing out of it:
https://firebase.google.com/docs/reference/rest/database
I have integrated slack in my custom application using the API provided by Slack.
I am able to fetch the post from Slack and able to display it in my application. I am able to fetch the image that was uploaded with the post (Few days back) but today when I added a post with the image. The image is not being displayed in the application, when I am trying to access the image URL in the browser it is asking for Authentication.
I am accessing the slack rest API to fetch the post from slack. from the response I am taking the "thumb_64" parameter from the "file" object.
I am able to access the below image URL, this image was uploaded on 2016-01-11
https://files.slack.com/files-tmb/T0F8RH7U7-F0J505EG1-33434fadf3/screenshot_from_2015-12-28_15_23_39_160.png
But I am not able to access the below mentioned URL ,this image is uploaded on 2016-02-16
https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Thanks & Regards,
Have you seen the update where #slackapi announced about accessing files using the Web API?
Essentially, you now need to provide authentication to access file assets, by specifying an HTTP Authorization header with an OAuth token that has the correct scopes to access that kind of data for a team.
For example, you'd send a header like this with your GET request:
GET https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Authorization: Bearer YOUR_VALID_ACCESS_TOKEN_HERE
The File type documentation goes into further detail.
how to parse json data sent from android app. Suppoce i have a method in my controller inside which i have to parse this json data.
Suppoce android app is able to send json to provided url. As i believe in order to get data from android app I have to provide some url to the android application.
The major question is where is that json is stored, do I access via parameters hash?
try this
in controller create one method and call it in before_action
e.g.
before_action :parse_json_data_to_params
def parse_json_data_to_params
params.merge!(ActiveSupport::JSON.decode(request.raw_post))
end
plese dont forget to write except block in front of bfore_action because it will raise an error for get requests.
A little background info so you can know my overall goal:
I have a web app that uses rails and Devise for authentication. I also am making an iPhone app which I need to be able to send and retrieve data to/from this app. I've decided to make a custom token authentication system in order to handle this.
I want to be able to send a username and password in JSON format as a post request to my app, have the app get that username and password, then have the app reply with a token in an xml or JSON format.
How do I make an action that will get information from a post request (username and password) and process it then return something else?
I just recently attended a meetup that explained Helios, which sounds like what you are looking for.
Check out their docs. Also this Github is an example of helios in action.
I have a Gosquared widget in my Geckoboard that is tracking one of my site.It is working perfectly fine.Now,I want to add another Gosquared widget to track another site. I entered all data correctly(site name, site ID and API key), also I have put the Gosquared tracking code on my rails application. When i try to create the widget, the connection breaks down with following error "Account does not exist.".I have no clue why its not working.Please help me!!
Try testing that data is being sent from the GoSquared API successfully by accessing the GoSquared API URL directly using your credentials:
http://api.gosquared.com/concurrents.json?sid={SITE_ID}&api_key={API_KEY}
Make sure you replace {SITE_ID} and {API_KEY} in that URL with your respective details.
If you receive a JSON object like {"concurrents":150,"range_max":187} then the problem may be with Geckoboard somewhere. If you get an error on the GoSquared API, contact us on support#gosquared.com or message me here!
Geoff
GoSquared