1

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]

irfanka
  • 129
  • 1
  • 14

1 Answers1

0

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.

  • Thanks for the answer. 1) Fair enough, I'll try that 2) /tickets is an endpoint documented in the API docs: [link](https://developer.glympse.com/rest/api/tickets) It worked in the sandbox 3) I'll try that too. The only way I was able to login in the sandbox, though, was by including it in the URL. Also, the REST API samples do that too: [link](http://jsfiddle.net/glympse/pY9vS/) 4) Apologies, slipped my attention – irfanka Dec 28 '15 at 23:18
  • Also, regarding 2): It's not the only endpoint that returns an empty "data" object. When you say development support, do you mean this [link](https://glympse.zendesk.com/anonymous_requests/new) ? – irfanka Dec 28 '15 at 23:26
  • Yes, that is the link. There is also a direct email for developer support, but I can't post it on SO. – Alexander F. Clark Dec 30 '15 at 00:00
  • Ok, thanks. I followed all you instructions, but the "data" object was still being returned empty. Then I realized that Glympse has a versioned API, and that I'm missing `/v2/` from the base URL.. :) Appended it, and the problem went away. – irfanka Dec 30 '15 at 12:06
  • Good catch. Thank you. I updated my response appropriately. – Alexander F. Clark Dec 31 '15 at 17:27