Kerm
Posts: 0
Joined: Mon Nov 18, 2013 6:08 am

Help generate Authorization header for Stackmob!

How do I generate an authentication header like this for the Stackmob OAuth 2.0 API?

https://developer.stackmob.com/rest-a...

I've got the mackey and accesstoken stored but I have no idea how to write the script for the Authorization header, if you could do this it would be much appreciated and help those who wish to integrate Stackmob with Appery.io too!

Kerm
Posts: 0
Joined: Mon Nov 18, 2013 6:08 am

Help generate Authorization header for Stackmob!

That's oAUTH 1.0, I need 2.0.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Help generate Authorization header for Stackmob!

We don't have an example but they show the steps in here (same link you provided above): https://developer.stackmob.com/rest-a.... It is just using JavaScript, there is nothing specific to Appery.io

Kerm
Posts: 0
Joined: Mon Nov 18, 2013 6:08 am

Help generate Authorization header for Stackmob!

It'd be great if you could provide the script since it's relatively hard to generate, the StackmobJS sample doesn't help as it includes the StackmobJS SDK.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Help generate Authorization header for Stackmob!

Hello! To create Login service for StackMob you have to create REST service:

URL: https://api.stackmob.com/user/accessT...
Method: POST
Content Type: x-www-form-urlencoded

with the following request parameters:
1) "X-StackMob-API-Key" - API key value (you can get it here https://dashboard.stackmob.com/login?...), check Header
2) "X-StackMob-User-Agent" - SDK Version (according to documentation http://stackmob.com/), check Header
3) "Content-Type" - constant value "application/x-www-form-urlencoded", check Header
4) "Accept" - constant value "application/vnd.stackmob+json; version=0", check Header
5) "username"
6) "password"
Should be like on the screenshot

Image and here is the Test tab
Image

Kerm
Posts: 0
Joined: Mon Nov 18, 2013 6:08 am

Help generate Authorization header for Stackmob!

Hi There,
I've already done the above, however the trouble is signing requests using oAuth 2

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Help generate Authorization header for Stackmob!

Hello,

What exactly trouble?
Please show us error code or screenshot with error!

Kerm
Posts: 0
Joined: Mon Nov 18, 2013 6:08 am

Help generate Authorization header for Stackmob!

I need my requests signed like this:
https://developer.stackmob.com/rest-a...

I don't know how to.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Help generate Authorization header for Stackmob!

Have you tried StackMob support..? it's their API, I'd think will be able to help you quicker.

Return to “Issues”