Search code examples
glympse

REST API - Getting an empty data object in the response


While I was developing my app, I used a sandbox API key. Now that I completed development, I switched to the production API.

The responses I'm getting back from the API all have an empty data value:

enter image description here

This is true for all endpoints that require authentication. The account/create and account/login endpoints work just fine.

Things I checked so far:

  • That correct base url and API token are used
  • That the userId and password I'm using are generated by the production API

Is there something else I need to do on my part?

Is there, perhaps, a difference in the API itself, between the sandbox and production environment?

[![enter image description here][2]][2]


Solution

  • There are some problems with your request URL.

    Your request URL: http://api.glympse.com/v2/tickets?invites=true&oauth_token={oauth_token}

    Problems:

    1) Use https

    2) /tickets is an invalid endpoint. I suspect you meant https://api.glympse.com/v2/users/self/tickets

    3) Don't include token in your URL. Include it in your Authorization header.

    4) Never post tokens online! Ever!

    Try this...

    GET: https://api.glympse.com/v2/users/self/tickets

    HEADER: Authorization

    VALUE: Bearer pasteyouroauthtokenhere

    The Glympse API docs contain a list of most of the endpoints. It isn't 100% up-to-date, but you will find answers to most of your questions: https://admin.enterprise.glympse.com/docs/api

    I also suggest connecting with Glympse's development support. They're very responsive and helpful.