Skip to main content

Is JSONP enabled in the API?

I'm attempting to using AngularJS to access the API using JSONP (eg ?callback=JSON_CALLBACK, via this ST question) and I'm getting a 404 when hitting the /oauth/token endpoint.

Is JSONP enabled? If so, what might I be doing wrong here?

Relevant code below:

$http.jsonp('https://my_nation.nationbuilder.com/oauth/token?callback=JSON_CALLBACK', {
  method: 'POST',
  data: {
    client_id: 'CLIENT_ID',
    redirect_uri: 'http://localhost:9000',
    grant_type: 'authorization_code',
    client_secret: 'SECRET',
    code: 'CODE',
  }
})
Share this post

Showing 3 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.