[Iplant-api-dev] Trouble getting authentication through agave.iplantc.org/token

Landers, Dustin Alan dal9834 at uncw.edu
Mon Dec 16 15:19:02 MST 2013


Hello!

I'm trying to get a foothold with Agave, as I intend to install some tools (maybe TASSEL) in to Agave this week. I have tried the following command in curl after setting up an application and so on. This was on the following tutorial: http://agaveapi.co/getting-started-with-the-agave-api/

curl -sku "$CLIENT_SECRET:$CLIENT_KEY" -X POST -d "grant_type=client_credentials&username=$API_USERNAME&password=$API_PASSWORD&scope=PRODUCTION" -H "Content-Type:application/x-www-form-urlencoded" https://$API_HOST_URL/token

Where $CLIENT_SECRET and $CLIENT_KEY are from the iPlant API store and $API_USERNAME and $API_PASSWORD are just my iPlant credentials. $API_HOST_URL is agave.iplantc.org. It returns this result:

{
"error":"invalid_client",
"error_description":"Client Authentication was failed."
}

Also, can anyone help me understand why other requests I send return empty results. I tried a different method using python:

import requests
header_payload = {'Authorization':'Bearer ' + token}
r = requests.get('https://agave.iplantc.org/apps/2.0', headers=header_payload)
print r.json()

It was my understanding that this should return a list of apps installed on agave. Instead, I get this:

{
"status": "success",
"message": None,
"version": '2.0.0-SNAPSHOT-rf64a967",
"result": []
}

An empty list? 

Can anybody point me in the right direction? Or maybe the best documentation for finding the answers to these questions. I am very familiar with Foundation.

Thanks!

Best,
Dustin Landers





More information about the Iplant-api-dev mailing list