You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CheezeNotes/pages/sirenNonDiffusible.md

22 lines
1020 B

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

[retour](BPCE-SI-Notes)
# Siren non diffusible
[api insee](https://api.insee.fr/catalogue/site/themes/wso2/subthemes/insee/pages/item-info.jag?name=Sirene&version=V3&provider=insee)
## Identifiants
* login : sanchez
* email : nicolas.sanchez@it-ce.fr
* mot de passe : Bpcesiinsee1
* application : DefaultApplication
## Token
* clé consomateur : nvdLPdEAJNdbMhO8JdCY73vtBcwa
* secret du consommateur : Bc1UMnrj8f3kfCQ8CmAt0vOMU7ca
* jeton : 0c56889c-1d1d-3909-ac8e-e4e98763b0e0
## Génération token
> `curl -k -d "grant_type=client_credentials" \`
> ` -H "Authorization: Basic Base64(consumer-key:consumer-secret)" \`
> ` https://api.insee.fr/token`
> `curl -k -d "grant_type=client_credentials" \`
> ` -H "Authorization: Basic Base64(nvdLPdEAJNdbMhO8JdCY73vtBcwa:Bc1UMnrj8f3kfCQ8CmAt0vOMU7ca)" \`
> ` https://api.insee.fr/token`
## Récupération des données json/csv
- premier appel JSON pour savoir combien d'enregistrements. Si < 200000 alors un seul appel csv, sinon, on continue toute la requête en json.