4

So, I am using this page as a reference for retrieving subscriptions for an array of mobile numbers:

https://code.exacttarget.com/api/contacts-subscriptions

The page seems to differ from other API pages in that the mobileNumber array isn't named the same as the other API calls that take an array of numbers. The other API guides have it named as mobileNumbers.

Also, the API request doesn't show "access_token" as a parameter for the API call. I added the access_token at the end of my JSON request but keep getting a HTTP 400 error. Other API calls that I make work just fine, it's only the call I am making to the following URL that has an issue:

https://www.exacttargetapis.com/sms/v1/contacts/subscriptions?access_token=sometoken

Any help would be greatly appreciated!

2
  • Strange - I'll have a look at the docs and see about updating. Are you currently able to do any other calls into exacttarget? Feb 17, 2014 at 2:11
  • Hey Kelly, yes, I am able to make other calls into Exact Target. It just seems to be the sms/v1/contacts/subscriptions call that keeps throwing a 400 error. Any suggestions?
    – Joshua
    Feb 17, 2014 at 16:53

1 Answer 1

1

The correct payload for this is using mobileNumber

{
  "mobileNumber": ["15555555555"]
}

You will need to add the authorization token - the docs need updating, however usage of the access_token is becoming insecure, and you would want to add the following to your header:

Authorization  Bearer (your access token)

Also, double check you app permissions. Be sure that the contact sections allow for read/write access.

2
  • Thank you! I also ended up having to add read/write/send permissions to nearly all channels for my application in the code.exacttarget.com AppExchange/Hub
    – Joshua
    Mar 10, 2014 at 12:18
  • Permission issues are difficult to debug as well. I'll add that to the answer and we can mark it answered. Thanks for using the community. Hope we can be a help to you. Mar 10, 2014 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.