How to get the user_id to send message?
  • Hi,

    I've just create a new account and I'm trying to send myself a message with the console to my Geoloqi iPhone app.

    I'm able to send myself a message with the map. I can't with the console since I don't have the user_id. I can't find anything in the API to retrieve it.

    Can someone point me in the right direction?

    Thanks
  • 4 Comments sorted by
  • Hi,

    I'm having the same problem.
    I was trying to retrive users in my app
    1. go to the API console page
    2. GET, assign Authentication with my app's token
    3. use "user/list"
    and this is what I got returned:
    {
    "
    error_code": "400 Bad Request",
    "
    error": "invalid_client",
    "
    error_description": "No client credentials provided, or invalid client"
    }

    How exactly can we use this API as the sample code in the document of user/list shows:
    curl -s -H "Content-Type: application/json" \ 
    --user "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" https://api.geoloqi.com/1/user/list
    Thanks
  • If you are trying to send a message to yourself, you can use the "message/send" method with only the "text" parameter. You do not need to provide the user_id to send a message to yourself.
  • If you encounter this error on the Console while accessing "user/list"

    {
    "
    error_code": "400 Bad Request",
    "
    error": "invalid_client",
    "
    error_description": "No client credentials provided, or invalid client"
    }

    Then it's better you select
    POST instead of GET and that should work.

    the parameter that you need to use is

    client_id and
    client_secret

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion