403 - Forbidden on attempted outbound subscription creation

  • 1
  • Question
  • Updated 3 years ago
  • Answered
On behalf of a client, I have successfully created an application and notification channel using the AerFrame REST API.

I am attempting to create inbound and outbound subscriptions and am receiving an HTTP response of 403 - Forbidden.

The endpoint I am using is:

https://api.aerframe.aeris.com/smsmessaging/v2/{accountId}/outbound/{applicationShortName}/subscriptions?apiKey={apiKey}

The accountId, applicationShortName and apiKey used are the actual values provided by AerFrame.

The body of the call is:

{
"callbackReference": {
"callbackData":"{applicationShortName}",
"notifyURL":"{notifyURL provided by AerFrame}"
},
"filterCriteria":"SP:*"
}

When POSTing this, I receive 403 Forbidden. I am trying to use the guide provided at http://neo.aeris.com/resources/references/aerframe-code-samples/

I presume I have missed a step, or not following the guide correctly. Please provide any feedback.
Photo of Hazen Hills

Hazen Hills

  • 3 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Bob Heckmann

Bob Heckmann, Official Rep

  • 349 Posts
  • 12 Reply Likes
Hi Hazen,

Thanks for the post. It looks like you're missing some values in the call body, which come from earlier steps in the process. Please refer to this AerFrame tutorial for details.

Regards,
Bob
Photo of Hazen Hills

Hazen Hills

  • 3 Posts
  • 0 Reply Likes
Thank you for replying.

What am I missing, specifically?

I have the same JSON data structure that the page you linked to has for creating an outbound subscription.

My data:
{
    "callbackReference": {
        "callbackData":"{applicationShortName}-mt",
        "notifyURL":"{notifyURL provided by AerFrame}"
    },
    "filterCriteria":"SP:*"
}
The body on the page you linked has exactly the same for outbound subscriptions.

http://neo.aeris.com/wp-content/uploads/sites/2/2014/09/aerframe_create_mt_subscription_2.png

If it's not clear, the values in brackets above are replaced by the values provided by AerFrame.
Photo of Hazen Hills

Hazen Hills

  • 3 Posts
  • 0 Reply Likes
I got it working.

I was using the Account API Key instead of the Application API Key when trying to create subscriptions.
(Edited)
Photo of Bob Heckmann

Bob Heckmann, Official Rep

  • 349 Posts
  • 12 Reply Likes
Great, glad to hear it. Thanks for posting the resolution.

Regards,
Bob