Obtaining & Using CUSTOMER_KEY

#1

Greetings,

I am attempting to obtain a customer object using the Customer GET endpoint as described here.

This works fine if I use the basic authorization method (discussed here) which returns the object in question (including the “id” and “token” key/value pairs).

However, if I attempt to call the following user endpoint:
curl 'https://mdash.net/api/v2/customer?access_token=CUSTOMER_KEY'

…when CUSTOMER_KEY = “id” or token", it always returns “{“message”:“Not Found”}”.

Any advice?
-AD

#2

Hello again - just checking in to see if anyone has used the Customer GET endpoint as described here? Kind of stuck at the moment.

Thanks!
-AD

#3

In order for the customer API to return anything, and ACL should allow that. If an ACL is empty (which is a default), you’ll get 404.

#4

OK, figured it out with some help from the mDash crew:

  1. First call the customer GET endpoint using basic auth. This will return the customer object.
  2. Once you have the customer object, copy the “token” - this is your CUSTOMER_KEY
  3. Now you can make use of the customer GET endpoint as follows with needing username/password:
    curl 'https://mdash.net/customer?access_token=<token>'

Note that there is a URL typo in the Client API docs that was causing my initial confusion.

-AD

1 Like