AnsweredAssumed Answered

oAuth 1.0 signature creation in FMPA16

Question asked by tictaco on Apr 14, 2018
Latest reply on Apr 15, 2018 by bigtom

Hi,

 

I'm trying to connect to the Nokia Health API.

I'm unable to connect from within Filemaker. Can't get the oAuth1 signature generated correctly.

 

Below some info on what I used and my attempt (including keys for I hope someone can generate a working example)

 

Used this site for testing the API: OAuth Test Client

Use the following credentials:

     Consumer key: c9c289d9623660634618225c39313132201cfc488fe488ff5e7d98571c0748

     Consumer Secret: 4d5617ff442e2f26962c50726873247b727dfb2959ccd38cf0d959017d9f6603

     Endpoint URL: https://developer.health.nokia.com/account/request_token

 

At the time I tested this was the working request:

request url: http://developer.health.nokia.com/account/request_token?oauth_version=1.0&oauth_nonce=b89f54d691fc0fc9b0850655bd7563b0&oauth_timestamp=1523713843&oauth_consumer_key=c9c289d9623660634618225c39313132201cfc488fe488ff5e7d98571c0748&oauth_signature_method=HMAC-SHA1&oauth_signature=3CNQeyi2LHS2WQ%2BaEyR1YvJWYpE%3D

OAuthRequest Object

(

    [parameters:OAuthRequest:private] => Array

        (

            [oauth_version] => 1.0

            [oauth_nonce] => b89f54d691fc0fc9b0850655bd7563b0

            [oauth_timestamp] => 1523713843

            [oauth_consumer_key] => c9c289d9623660634618225c39313132201cfc488fe488ff5e7d98571c0748

            [oauth_signature_method] => HMAC-SHA1

            [oauth_signature] => 3CNQeyi2LHS2WQ+aEyR1YvJWYpE=

        )

 

 

    [http_method:OAuthRequest:private] => GET

    [http_url:OAuthRequest:private] => http://developer.health.nokia.com/account/request_token

    [base_string] => GET&http%3A%2F%2Fdeveloper.health.nokia.com%2Faccount%2Frequest_token&oauth_consumer_key%3Dc9c289d9623660634618225c39313132201cfc488fe488ff5e7d98571c0748%26oauth_nonce%3Db89f54d691fc0fc9b0850655bd7563b0%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1523713843%26oauth_version%3D1.0

)

The above generated data I used to check if I was able to generate the same signature from the given Basestring. Unfortunately I wasn't.

 

I hope someone can create a working example for Filemaker 16 InsertFromUrl script.

Outcomes