Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Need help on example access token generation for SnapDiff API v3
2023-02-14
04:35 PM
1,899 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
We are just starting an effort to convert some code to SnapDiff v3 and REST.
We've received the SnapDiff v3 documentation, and also an activation key from our Netapp partner manager.
We are having trouble getting a basic example working from the documentation. I think we either have a bad key, or maybe doing something wrong with the initial access-token submission. We are following the directions in section 3 of the doc, attempting to use the REST API /api/cluster/licensing/access-tokens. I am issuing something similar to this:
curl -ku name:password -X POST \
"https://1.2.3.4/api/cluster/licensing/access_tokens?return_timeout=0" \
-H "accept:application/json" \
-d '{"grant_type":"client_credentials","client_id":"software","client_secret":"<base64encoded value>"}'
The <base64encoded value> I'm using was the "Signature" JSON field of the key file supplied to us.
I get back a rather nebulous message:
{
"error": {
"message": "Internal error. Failed to create access token.",
"code": "1115544"
}
Any thoughts on what might be going wrong ... or am I using an incorrect value for the client_secret?
Thanks
Solved! See The Solution
1 ACCEPTED SOLUTION
Drew_C has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We had bee struggling on this for more than week ... turned out the key generation was bad. I got a new key this morning, and the example code works.
Thanks for the response, I appreciate it.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there, this is not my area, but I did some digging. It looks like for the client_secret, it is the specification of the client details and the signature, encoded into base64.
Decoded it will begin something like:
{"statusResp":{"contract_id":"123456","isv_long_name":"test
So try encoding the entire JSON file with base64 and using that.
Let me know how it goes.
Drew_C has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We had bee struggling on this for more than week ... turned out the key generation was bad. I got a new key this morning, and the example code works.
Thanks for the response, I appreciate it.
